You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by l vic <lv...@gmail.com> on 2019/03/06 20:14:17 UTC
jolt transform
I have json message that contains another json message in textual form:
{
"one": "one".
"two":2,
"MSG": "{\"src\":\"my source\",\"priority\":\"0\"}"
}
What would be transform spec to get "contained" message in json ?
{
"src": "my source",
"priority": "0"
}
Thank you
Re: jolt transform
Posted by Andy LoPresto <al...@apache.org>.
I don’t know of a way to do this in Jolt. You could use an EvaluateJsonPath processor to extract the MSG element to content or an attribute, and use the Expression Language unescapeJson function to remove the escape characters.
Andy LoPresto
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
> On Mar 6, 2019, at 12:14 PM, l vic <lv...@gmail.com> wrote:
>
> I have json message that contains another json message in textual form:
> {
> "one": "one".
> "two":2,
> "MSG": "{\"src\":\"my source\",\"priority\":\"0\"}"
> }
>
> What would be transform spec to get "contained" message in json ?
> {
> "src": "my source",
> "priority": "0"
> }
> Thank you
>