Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Solved
Go to solution
add node in json array using Apache nifi
Labels:
- Labels:
-
Apache NiFi
Explorer
Created 04-15-2022 12:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
field to add
"quality"
input json :
{
"json_data": {
"id": "1234",
"items": [
{
"id": "000000",
"metadata": {
"newId": "82896888047600"
}
}
]
}
}
output json :
{
"json_data": {
"id": "1234",
"items": [
{
"id": "000000",
"metadata": {
"newId": "82896888047600",
"quality" :"good"
}
}
]
}
}
1 ACCEPTED SOLUTION
Super Guru
Created 04-21-2022 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the JoltTransformJSON processor with the following Chain specification:
[
{
"operation": "default",
"spec": {
"json_data": {
"items[]": {
"*": {
"quality": "good"
}
}
}
}
}
]
Cheers,
André
--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
1 REPLY 1
Super Guru
Created 04-21-2022 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the JoltTransformJSON processor with the following Chain specification:
[
{
"operation": "default",
"spec": {
"json_data": {
"items[]": {
"*": {
"quality": "good"
}
}
}
}
}
]
Cheers,
André
--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
