1

I am having below json which is not normal the first node is dynamic for example it will be incremented to two for next record, i don`t know from which number and where it will start any help.

{"1":
{
    "entity_id":"1"
    ,"website_id":"1"
    ,"email":"my@gmail.com"
    ,"group_id":"1"
    ,"created_at":"2014-05-14 16:19:22"
    ,"disable_auto_group_change":"0"
    ,"firstname":"umesh"
    ,"lastname":"rakhe"
    ,"created_in":"dwetl"
},"2":{
    "entity_id":"2"
    ,"website_id":"2"
    ,"email":"my2@gmail.com"
    ,"group_id":"1"
    ,"created_at":"2014-05-14 16:19:22"
    ,"disable_auto_group_change":"0"
    ,"firstname":"ram"
    ,"lastname":"rakhe"
    ,"created_in":"dwetl"
} }
UmeshR
  • 803
  • 1
  • 9
  • 16
  • What are you trying to accomplish here? Your problem isn't really clear. – Mark S Feb 16 '15 at 17:04
  • i am trying to read all nodes started from entity_id and so on – UmeshR Feb 16 '15 at 17:06
  • tExtractJSONFileds component doesn't support nodes, which starts with a number. Clearly.. If you have a Key --> value pair, for example, "1":"it is a number", tExtractJSONFileds component will fail. Because, this component expecting your key should start with a character not a number. in your case, instead of "1":{....} write "a1":{....}. it will work. – madhu_karnati Mar 04 '15 at 21:26
  • @madhureddy480 thank you clarifying it, This is a dictionary type json file, wherein I can not predict which number will come on which place. – UmeshR Mar 05 '15 at 06:03
  • @UmeshR all you have to care about is your key (left side part of ":" ) is starting with a digit or not. I had a same issue when I was working with talend. So What I did was, I created a simple "tJavaRow" component and added a java code to identify and modify those keys. ( But I kept a copy of original json string safely a side for other uses.) – madhu_karnati Mar 06 '15 at 20:56

0 Answers0