54
Views
2
Comments
Solved
[JSON Tool Kit] Is it possible to clear a JSON list and to add an entire list to an attribute?
json-tool-kit
Service icon
Forge asset by Emidio Correia
Application Type
Traditional Web

Hello all,

I am using the component and I am trying to use some action that I don´'t know ifit supports.

Is it possible to remove all the positions of a list to make it empty?
Maybe something like this?

{

  'root': {

    'person': [ ]

  }


}

I already tried the Remove property but I could not achieve this part.

And the other question is, is it possible to add a list to a defined property like adding something like this:


[
{
"@id": "1",
"url": "http://www.google.com"
},
{
"@id": "2",
"name": "Louis",
"url": "http://www.yahoo.com"
}
    ]

To a property that is empty, like the 'person' in this case?


Thanks in advance,

2020-09-26 11-27-59
Emidio Correia
Solution

Hi Eduardo, sorry for the late answer and thanks for your input!

The workaround for a solution until an update for this extension:

1 - First you can remove the property and after that add new one:

2 - Add the new one:


3 - For your last question, you can add a list as a string but be careful: without the chars \n\r (enter char and newline):


Use the tests pages like I did with your JSON if you need. 

Tks!

2021-11-23 12-51-14
Eduardo Oliveira

Hello Emidio, thanks for the response.

I don't remember how I did it but I made it work somehow, but I will mark as a solution if someone in the future needs.

Thanks a lot.

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