Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Help required extracting component from decoded JSON string
Topic Summary:
Created On: 05/15/2018 09:18 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 05/15/2018 09:18 PM
User is offline View Users Profile Print this message

Author Icon
JasonRiley
Apprentice (20-49)

Posts: 25
Joined: 11/02/2016

Hi. I'm trying to extract the "message" component from the attached Facebook JSON string, but it fails when attempting to decode the JSON array. Does anyone know what I'm doing wrong here?


Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 05/16/2018 08:23 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Hi Jason,
I tried to run your script and it failed but the following works! Note 'error' is a reserved work, so this is partially the culprit that makes your script fail. I think also the other part is that you are trying to pass in as Array. That part I am not sure since I have not worked with JSON. I think if you are getting a response back that has error, I would just replace the error with some other word to push it through (Use Text Action Replace)?


Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 05/16/2018 05:01 PM
User is offline View Users Profile Print this message

Author Icon
JasonRiley
Apprentice (20-49)

Posts: 25
Joined: 11/02/2016

Thank you. I wasn't aware of the keyword reservation in AM11. Facebook uses that word extensively in its error messaging. I'll do a simple text replace as suggested
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 646 guests browsing this forum, which makes a total of 646 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog