Wednesday, 10 May 2017

How to change a JSON string to Long/Double/Number

I have a JSON like this:

{ "id_document" : "12345679", "name" : "John SMmith", "value" : "127,30" }

I would like to change the "value" field to a Double/Number, like this:

{ "id_document" : "12345679", "name" : "John SMmith", "value" : 127.30 }

The problem is that I have a lot of JSON data, eg 70k lines. So I need a way to automate this. Does anyone have any ideias?

Resolution can be made in any language. I was trying NodeJS.

Thanks for the help guys.



via Yago

No comments:

Post a Comment