Home > other >  How to split a json string value by character into some substrings in Apache Nifi
How to split a json string value by character into some substrings in Apache Nifi

Time:09-29

i have a json file like the schema below and want to split the value of the key 'adress' by a character (for example a comma):

{
  "id": 123,
  "name": "James",
  "adress": "Oxford Street,21,London,England"
}

and convert it to the following (-> split the adress field by comma into these fields):

{
  "id": 123,
  "name": "James",
  "street": "Oxford Street",
  "house number": "21",
  "city": "London",
  "country": "England"
}

I found a solution in internet (enter image description here

  • Related