You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by "N, Vyshali" <Vy...@Honeywell.com> on 2018/07/19 15:57:21 UTC
Merge content of two json files in nested form
Hi,
My requirement is that I want add the entire json content from one file to another json file by adding a new attribute.
For example, I have the following content in one file,
{
Plant: 8415,
Module: M1
}
The above content should be merged to another json file with the addition of "Data" attribute as,
{
Id:222-2222-2222,
Data: {
Plant: 8415,
Module: M1
}
}
Please let me know the suitable approach
Regards
Vyshali
Re: Merge content of two json files in nested form
Posted by Sivaprasanna <si...@gmail.com>.
Vyshali,
I think you can use JoltTransformJSON processor. If you want to rename this
to a file, connect JoltTransformJSON with UpdateAttribute and update tye
filename attribute there. Hope this helps.
-
Sivaprasanna
On Thu, 19 Jul 2018 at 9:27 PM, N, Vyshali <Vy...@honeywell.com> wrote:
> Hi,
>
>
>
> My requirement is that I want add the entire json content from one file to
> another json file by adding a new attribute.
>
>
>
> For example, I have the following content in one file,
>
>
>
> {
>
> Plant: 8415,
>
> Module: M1
>
> }
>
>
>
> The above content should be merged to another json file with the addition
> of “Data” attribute as,
>
>
>
> {
>
> Id:222-2222-2222,
>
> Data: {
>
> Plant: 8415,
>
> Module: M1
>
> }
>
> }
>
>
>
> Please let me know the suitable approach
>
>
>
> Regards
>
> Vyshali
>