You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basing on the size of the termMarks array my output json should change. In the above input my "termMarks" size is 3 so I wanted the "terms" array in the output to be 3.
can someone help with a template
The text was updated successfully, but these errors were encountered:
@rob2701, unfortunately there is no easy way to reduce arrays of arrays to a single array if you also want properties that are not in the array. In your example "name". If you only want marks themselves you can try to use jsonpath expressions
Hello, this is a question on forming a template.
My input is :
termMarks is an array and its value can change, can be just 1 or a maximum of 4
{
"id" : "123",
"subject": [{
"name": "math"
"termMarks": [
"test1","test2","test3"
]
}]
}
Desired Output for above input :
{
"id": "123"
"terms": [
{}, {},{}
] }
Basing on the size of the termMarks array my output json should change. In the above input my "termMarks" size is 3 so I wanted the "terms" array in the output to be 3.
can someone help with a template
The text was updated successfully, but these errors were encountered: