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
I want to retrieve the nested array "contacts" values. But when I tried with .contacts, I am not able to get the values of the contact array fields from the input json. Please help me on this.
Below is the Input structure and the JSLT transformation being used:
I want to retrieve the nested array "contacts" values. But when I tried with .contacts, I am not able to get the values of the contact array fields from the input json. Please help me on this.
Below is the Input structure and the JSLT transformation being used:
+++++++++++++++++++++++++++input+++++++++++++++
[
{
"a" :"12",
"b" :"13",
"contacts": [
{
"Id": "1",
"Contact_Id": "1234"
{
"Id": "3",
"Contact_Id": "333333"
},
{
"a" :"12",
"b" :"13",
"Watercraft_AdditionalInterests": [
{
"Id": "4",
"Contact_Id": "77777"
},
{
"Id": "5",
"Contact_Id": "888888"
}
]
++++++++++++++++JSLT+++++++++++
def range(length, list)
if (size($list) < $length)
range($length, $list + [size($list)])
else
$list
def zip(arr1, arr2)[
for (range(size($arr1), []))[$arr1[.], $arr2[.]]]
{
for (.) {
],
[
for(..contacts){
"body": {
"data": {
"attributes": {
"contact": {
"code": "contact"
},
"contacts": {
"id": ..Id,
"contact id" : ..Contact_Id
))
}
The text was updated successfully, but these errors were encountered: