I have been importing a JSON file with VS script for about 6 yrs. Variables have been added during the past 6yrs and I was able to handle the legacy data with the added code 'ContainsKey' on the mapping code. (ex.
)
Recently a variable was added ("grouping_uuid") within the 'metadata' array and I'm having trouble trying to utilize the ContainsKey with a list name/ChildrenToken within an array. (ex
).
simplified version of the JSON file:
I've been struggling for about a week and any help will be greatly appreciated. Thank you.
Best Regards
C#:
nba_draw_result = record.ContainsKey("nba_draw_result") == true && record["nba_draw_result"] != "" ? record["nba_draw_result"] : null
Recently a variable was added ("grouping_uuid") within the 'metadata' array and I'm having trouble trying to utilize the ContainsKey with a list name/ChildrenToken within an array. (ex
C#:
grouping_uuid = record.ContainsKey(record["metadata"]["grouping_uuid"]) == true && record["metadata"]["grouping_uuid"] != "" ? Convert.ToInt32(record["metadata"]["grouping_uuid"]) : null
simplified version of the JSON file:
C#:
[
{
"nba_draw_result": "",
"metadata": {
"grouping_uuid": 193504398
}
},
]
Best Regards
Last edited by a moderator: