19
Views
1
Comments
[JSON Tool Kit] How to add an object to an empty array?
json-tool-kit
Service icon
Forge asset by Emidio Correia
Application Type
Traditional Web


I would like to add

{

    '@id': '3',

    'name': 'Bing',

    'url': 'http://www.bing.com'

}

into the empty array [].


Doing that I got "Cannot parse JSON".

UserImage.jpg
Alexandre Yip

Hi Gabriel Melo, 

As a workaround you can create a wrapper action for the component and test if result is not empty retrieve the component output otherwise you can retrieve a default structure with the pretended values. 

Hope that it helps you 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.