In fact, I try to make a loop in a loop in a loop ...
I found this solution :
{
"Attributes":[ for $Age at $pos in fme:get-list-attribute("_list{}.Age")
let $Date := fme:get-attribute(concat("_list{",$pos - 1,"}.Date"))
return {"Date":$Date, "Age": $Age}]
}
that work for 1 sub object but for multiple sub object ??
{
"Attributes":[
for $Age at $pos in fme:get-list-attribute("_list{}.Age")
let $Date := fme:get-attribute(concat("_list{",$pos - 1,"}.Date"))
return {
"Date":$Date,
"Age": $Age,
"Sub Attributes":[
for $SubAge at $Subpos in fme:get-list-attribute("_list{}.SubAge")
let $SubDate := fme:get-attribute(concat("_list{",$pos - 1,"}.SubDate"))
return {
"SubDate":$SubDate,
"SubAge": $SubAge,
"SubSubAttributes":[
for $SubSubAge at $SubSubpos in fme:get-list-attribute("_list{}.SubSubAge")
let $SubSubDate := fme:get-attribute(concat("_list{",$pos - 1,"}.SubSubDate"))
return {
"SubSubDate":$SubSubDate,
"SubSubAge": $SubSubAge,
}
]
}
]
}
]
}
Can you share your sample json as text rather than a screenshot?
Thanks for your reply @ebygomm I've data extract join in this post :-)