jSon array to multiple column

611 views
Skip to first unread message

Rajbhar

unread,
May 30, 2013, 7:38:19 AM5/30/13
to openr...@googlegroups.com

Hi all,

I want to know how to parse JSON data into multiple coumn. its obivous that "value.parseJson().output.places[0].poiName" will give one result.

the below data is withing one cell i want to seprerate each value into seperate column like this

ID|Poi_name

P0011226043|Shree Bhagyalaxmi Metal Industries
N0001852384|Shree complex
P0011070822|Tamia Complex





{
    "search": "Commercial",
    "output": {
        "where": "current map view",

        "num": 100,
        "sort": 1,
        "tot": 100,
        "page": 0,
        "type": "results",
        "what": "",
        "places": [
            {
                "id": "P0011226043",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Bhagyalaxmi Metal Industries",
      
      
            },
            {
                "id": "N0001852384",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Complex",
               
            },
            {
                "id": "P0000049432",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Engineering",
 
            },
            {
                "id": "P0011226810",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Agencies",
 
            },
            {
                "id": "P0011078280",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Complex",
 "
            },
            {
                "id": "P0011071702",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Complex",
 
            },
            {
                "id": "P0000047558",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Engineering",
 
            },
            {
                "id": "P0010994025",
                "user": "0",
                "zomato": "",
                "poiName": "Tallbros Automotive Component",
 
            },
            {
                "id": "P0010179416",
                "user": "0",
                "zomato": "",
                "poiName": "Tamhane Complex",
 
            },
            {
                "id": "P0011070822",
                "user": "0",
                "zomato": "",
                "poiName": "Tamia Complex",
 
            },
            {
                "id": "P0011083929",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Micro Tech Ltd",
 
            },
            {
                "id": "P0011230194",
                "user": "0",
                "zomato": "",
                "poiName": "Tanaj Builders And Promoters",
 
            },
            {
                "id": "P0010994172",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Ganesh Vishwa Building",
 
            },
            {
                "id": "P0011218288",
                "user": "0",
                "zomato": "",
                "poiName": "Shree Gurudatt Real Estate",
 
            }

Tom Morris

unread,
May 30, 2013, 10:53:55 AM5/30/13
to openr...@googlegroups.com
I would use something along the lines of 

forEach(value.parseJson().output.places,p,p.placeId+'|'+p.poiName).join('||")

followed by "Split multi-valued cell" using a delimiter of ||

Tom



--
You received this message because you are subscribed to the Google Groups "Open Refine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

SanjayKumar Rajbhar

unread,
May 31, 2013, 1:48:03 AM5/31/13
to openr...@googlegroups.com
Doesn't Work. it reurns somthing "Parsing error at offset 67: Missing number, string, identifier, regex, or parenthesized expression". am trying to resolve myself. Lets see.
--
--
Sanjay

Tom Morris

unread,
May 31, 2013, 9:06:09 AM5/31/13
to openr...@googlegroups.com
On Fri, May 31, 2013 at 1:48 AM, SanjayKumar Rajbhar <sanra...@gmail.com> wrote:
Doesn't Work. it reurns somthing "Parsing error at offset 67: Missing number, string, identifier, regex, or parenthesized expression". am trying to resolve myself. Lets see.

"Something along the lines of" means that I typed it directly into email as an idea for you to follow, not that it was debugged ready-to-use code.

SanjayKumar Rajbhar

unread,
Jun 1, 2013, 6:51:46 AM6/1/13
to openr...@googlegroups.com
thanks Solved Now..!!

Germán Martínez

unread,
Jul 27, 2019, 7:29:08 PM7/27/19
to OpenRefine
How did you solve it?, I am currently having the same exact issue, I have gotten an entire column of json with OpenRefine and googleMaps API, and I would like to parse it into different columns like adress, latitude, longitude, description, etc.
thanks Solved Now..!!



Tom
 


To unsubscribe from this group and stop receiving emails from it, send an email to openr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Open Refine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
--
Sanjay

--
You received this message because you are subscribed to the Google Groups "Open Refine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Open Refine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
--
Sanjay

Owen Stephens

unread,
Aug 2, 2019, 2:49:13 AM8/2/19
to OpenRefine
Hi

Can you post an example of the JSON you are trying to parse and describe what you are currently trying and what happens?

Thanks

Owen

Reply all
Reply to author
Forward
0 new messages