Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I created a JSON file using tWriteJSONfield.
Currently, I got the following format:
{
"url": "http://google.com",
"findings": {
"id": "1",
"type": "1",
"sub_type": "7",
"cul": [],
"or": "3",
"date": "05-05-2015",
"num": []
}
}
and need the following ("findings" data should be inside an array):
{
"url": "http://google.com",
"findings": [{
"id": "1",
"type": "1",
"sub_type": "7",
"cul": [],
"or": "3",
"date": "05-05-2015",
"num": []
}]
}
How can I do that?
Attached is a screenshot of my Json tree.
Thanks,
Emma
OK, I have built the following dummy structure.....
{"rootTag":{"newColumn1":"IH4IST","newColumn2":[{"newColumn3":"IqGyhp","newColumn4":"ULsg8G"}]}}
....using this configuration.....
Basically, add an element called "element", assign it a class of object and add your fields to that element. That should do it.
Take a look at this webpage:
Notice the @class attribute and the "array" in the "static value" column? You need to make use of these. You will need to play around with this functionality until you "get it", but it is worth spending a few hours doing this to get it to sink in 🙂
Thank you,
I defined "findings" as @class = array, and added the sub-element "element" and defined it as "loop element", I managed to get "findings" as an array,
But without the element names (id, type, sub_type, cul, or, date, num):
{
"url": "http://google.com",
"findings": [
"1",
"1",
"7",
[],
"3",
"05-05-2015",
null,
[]
]
}
Do you know how to display the element names inside the array?
Thanks.
OK, I have built the following dummy structure.....
{"rootTag":{"newColumn1":"IH4IST","newColumn2":[{"newColumn3":"IqGyhp","newColumn4":"ULsg8G"}]}}
....using this configuration.....
Basically, add an element called "element", assign it a class of object and add your fields to that element. That should do it.
Thank you, It works
@rhall Could you please let me know how to configure multiple array objects
my expected output is as below
{
"_id": "123",
"cabins": [
{
"cabin_Id": "12434",
"name": "Cabin 1"
},
{
"cabin_Id": "8765",
"name": "Cabin 3"
}
],
"country": "FR",
"departments": [
{
"dept_id": "123",
"name": "Computers"
},
{
"dept_id": "345",
"name": "arch"
}
]
}