abhi pm
abhi pm

Reputation: 41

can we parse a records with separators at multiple levels using bindy

we have got a requirement to convert a tab delimited data record into a JSON structure. But there are some delimiter inside each field as well. Below would be the same data record

"123456 16  2014/6/960,2015/1/153   2014/2,2015/3"

below is the JSON we need to construct

[
      {
        "field1": "123456",
        "field2": 16,    
        "node1": [
          {
            "year": 2014,
            "qunatity": 6,
            "discounts": 960    
          },
          {
            "year": 2015,
            "qunatity": 1,
            "discounts": 153
          }
        ],
        "node2": [
          {
            "year": 2014,
            "qunatity": 2
          },
          {
            "year": 2015,
            "qunatity": 3
          }
        ]  
 }
]

i am able to write a method in my flow that splits the fields and create a list of objects. But is there any way we can handle it without writing a custom methods

Upvotes: 1

Views: 41

Answers (0)

Related Questions