โ10-17-2020 02:21 AM
I have a data set which is the following format:
[
{โversion_idโ:โ1660โ},
{โversion_idโ:โ1639โ}
]
and I would like to put the data into the following format;
[
{โCurrentValuesโ:
{โversion_idโ:โ1660โ},
{โversion_idโ:โ1639โ}
}
]
Any help would be much appreciated.
โ10-17-2020 03:57 AM
โ10-17-2020 08:08 AM
Hi @peter,
When you post JSON or code snippets, please put them inside a โPreformatted textโ section, otherwise, the double-quotes will get mangled by the forum into left-right quotes, which wonโt be usable as JSON.
Your example is a bit ambiguous. Is the first โdata setโ a single input document containing an array, or is it two separate input documents, each containing a separate object? Iโll assume the first for now.
Also, Igor is correct, the second JSON block isnโt valid JSON syntax. Iโll assume you intend for the value of โCurrent Valuesโ to be the array of objects from the input document.
If those assumptions are correct, try this: