Replies: 4 comments 1 reply
-
Have you tried writing some JSLT? What is the problem? |
Beta Was this translation helpful? Give feedback.
-
Try putting a parenthesis around |
Beta Was this translation helpful? Give feedback.
-
this is my jslt |
Beta Was this translation helpful? Give feedback.
-
The part that doesn't work isn't actually JSLT code, so it will never work. I don't even know what it means. But what you've written here will give you a single object with three keys. That's not what you want. Look at the tutorial, and look at |
Beta Was this translation helpful? Give feedback.
-
hey,
i have a small static json for example
{
"country": {
"usa": {
"new york": 445,
"los_angeles": 678
},
"canada": {
"toronto": 550,
"vancouver": 320
},
"uk": {
"london": 890,
"manchester": 270
},
"australia": {
"sydney": 360,
"melbourne": 410
}
}
}
and i have my input JSON ( i am using JSLT on apache NIFI)
In my input json i have country and city keys. I want to create a new key per json with the city code according to the static json
For example for the input :
{
"country" : "usa" ,
"city" : "new york"
}
i want the output will be :
{
"country" : "usa" ,
"city" : "new york",
"city_code" : "445"
}
I am using the processor JSLTTransormJSON and i defined the static json as a variable.
I would be happy to help with the continuation
thanks
Beta Was this translation helpful? Give feedback.
All reactions