Json Deserealize For Excel Data

Hello guys,

I have json result as below ;

I need to extract data on “place_id” in this json how can ı do that on uipath with this build ;

image

{
“html_attributions” : ,
“next_page_token” : “Aap_uEAWC2RWftvuGhrRxDWNL4xULPH0Ahhvezlkwhd3ERu9OcwB1FKi9nm6Nc2CiTBmtKo2NMzuSDY6vUXAKyzOdjK2_VNfaavu8U4Ts1OP4Is4fjjyxNPBJbNkjnHTEVFiVCN01vX1_NbeIABDcPQcKClnlDGt2oeEoLoANKc65H6YyXjs6C6tyUFh_Ca1dYqfhFH5KS7qM3EiQrYbYVCnAdRuPBwB4C-EhCGXnb6NpGoEFUMxqcZE_JtbCDvImxLiL-FzHRaUA4nzq4oMicPo9zE81LwSOBfKV7DfkLPZkwlYkkZ–vXfteNxATmOCPxcmqFEzAc70dUIv_Bk7GR9S1UrMSWzWwK98_1sthedkq5Jq2Pcmd6ChdTe9BfycNufLxcKIMRml6vWXlcb”,
“results” : [
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “Bebek, NO 50, Küçük Bebek Cd., 34342 Beşiktaş/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0812586,
“lng” : 29.04416
},
“viewport” : {
“northeast” : {
“lat” : 41.08258317989273,
“lng” : 29.04546977989272
},
“southwest” : {
“lat” : 41.07988352010729,
“lng” : 29.04277012010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “Bebek Pet Shop”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 5664,
“html_attributions” : [
“\u003ca href="Google Maps”\u003eFatih Duranoglu\u003c/a\u003e"
],
“photo_reference” : “Aap_uECoJUL6gJjfwM2f8E-dGIrWLf2rIV_ryDrB8E2q7LLnVZf89Cv5DNoNUjVNPLoG4YZsjN-OfPpMhn2Vh6heeVJgocWY8Jazo_400BuDCYa004SFPRav4KQJOb8RxJO03CmQcJJMSF7wfJErOaBJbWnwlBaAQtNfP_cjVA1i21PoN_Td”,
“width” : 4248
}
],
“place_id” : “ChIJQfJdjwK2yhQReiFrsS6ql1U”,
“plus_code” : {
“compound_code” : “32JV+GM Beşiktaş, İstanbul”,
“global_code” : “8GHF32JV+GM”
},
“rating” : 4.7,
“reference” : “ChIJQfJdjwK2yhQReiFrsS6ql1U”,
“types” : [ “pet_store”, “point_of_interest”, “store”, “establishment” ],
“user_ratings_total” : 36
},
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “Hasfırın Cad. Sinan Paşa İş Merkezi, No:5/127-128, 34022 Beşiktaş/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0428643,
“lng” : 29.0058679
},
“viewport” : {
“northeast” : {
“lat” : 41.04438767989272,
“lng” : 29.00715862989272
},
“southwest” : {
“lat” : 41.04168802010727,
“lng” : 29.00445897010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “Pet Store”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 550,
“html_attributions” : [
“\u003ca href="Google Maps”\u003ePet Store\u003c/a\u003e"
],
“photo_reference” : “Aap_uEBERIT_42HfRi9fZjOLHnUR8k51oTX4EDHEXoMtAv5PiF40GpTNpFkuWMminO3KrMjzGkjHSju4IbdYmpweXK68KJGWRUou7jfaU6NTcy6e8bi7uPR8HPJi6CUgThSFeZtUIki_FXjXOSjAcs1lq3Xl6ZFexUlEs-l83ag5qJkXMPfs”,
“width” : 1173
}
],
“place_id” : “ChIJO1MIFKK3yhQR1plbCCmPAqA”,
“plus_code” : {
“compound_code” : “22V4+48 Beşiktaş, İstanbul”,
“global_code” : “8GHF22V4+48”
},
“rating” : 4.1,
“reference” : “ChIJO1MIFKK3yhQR1plbCCmPAqA”,
“types” : [ “pet_store”, “point_of_interest”, “store”, “establishment” ],
“user_ratings_total” : 19
},
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “valikonağı caddesi Pasaj 73, D:No:73, 34371 Şişli/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0511128,
“lng” : 28.9902843
},
“viewport” : {
“northeast” : {
“lat” : 41.05240437989273,
“lng” : 28.99170407989273
},
“southwest” : {
“lat” : 41.04970472010729,
“lng” : 28.98900442010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “Dog N Kitty Pet Shop”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 4032,
“html_attributions” : [
“\u003ca href="Google Maps”\u003eA Google User\u003c/a\u003e"
],
“photo_reference” : “Aap_uEC1-hI8bbhlNBoaRoDh7NKPvmb1ojdnzszB3qEu5mX2O8thxOf2_Bi2kXWJVMPhx084rVwfk1ekN1BY_YesOPtumuIHUoAS0trkWYO1DyFadESZ0ir7IXh5ydbKNA_KAEdgYBnf1_w7qFht7t0pXbWIw7jZ8egu7kkGC6c8MiN5-_vd”,
“width” : 3024
}
],
“place_id” : “ChIJn3ThBJK3yhQRGBP0bRz86IU”,
“plus_code” : {
“compound_code” : “3X2R+C4 Şişli, İstanbul”,
“global_code” : “8GHC3X2R+C4”
},
“rating” : 4.9,
“reference” : “ChIJn3ThBJK3yhQRGBP0bRz86IU”,
“types” : [ “pet_store”, “point_of_interest”, “store”, “establishment” ],
“user_ratings_total” : 14
},
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “Sinanpaşa Mahallesi, ortabahçe caddesi büyük Besiktaş çarşısı no12/13/14, altında Postane olan çarşı, 34353 Beşiktaş/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0426404,
“lng” : 29.0054306
},
“viewport” : {
“northeast” : {
“lat” : 41.04417702989272,
“lng” : 29.00651662989272
},
“southwest” : {
“lat” : 41.04147737010728,
“lng” : 29.00381697010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “Flora Pet Shop”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 4032,
“html_attributions” : [
“\u003ca href="Google Maps”\u003esinan erel\u003c/a\u003e"
],
“photo_reference” : “Aap_uEAIxIE2T2bP0LhiflL3f1b-O6JKmTY17lB6QCYg7aldYZmnBHoxl03G6vuRNhWliYacV17U2_66H5fxb_8-WDySEjZBLtlJKHh_KupXLau4wn15AoqAdOZQdaxO9UONKoQ7FghPqTAoWCtbE_FefLXACyWC9SbgYt3hAAL3bT9Pj2Jm”,
“width” : 2268
}
],
“place_id” : “ChIJpUNDq5i3yhQRIx4DqWaIZdQ”,
“plus_code” : {
“compound_code” : “22V4+35 Beşiktaş, İstanbul”,
“global_code” : “8GHF22V4+35”
},
“rating” : 4.1,
“reference” : “ChIJpUNDq5i3yhQRIx4DqWaIZdQ”,
“types” : [ “pet_store”, “point_of_interest”, “store”, “establishment” ],
“user_ratings_total” : 161
},
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “Mevlana Mahallesi, Sefa Caddesi, 833. Sokak No:51/A Gaziosmanpaşa/Istanbul, 34000 Gaziosmanpaşa/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0855074,
“lng” : 28.9126828
},
“viewport” : {
“northeast” : {
“lat” : 41.08687537989272,
“lng” : 28.91407287989272
},
“southwest” : {
“lat” : 41.08417572010728,
“lng” : 28.91137322010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “KARAPATİ PET SHOP”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 3000,
“html_attributions” : [
“\u003ca href="Google Maps”\u003eKarapati Akvaryum Petshop\u003c/a\u003e"
],
“photo_reference” : “Aap_uEB5KHmanAUuw4xIy5_4K0FTd77M3N-J7piczoeiLcRz8-DE743T3khEVUMBF3EcOXnkhFtNg964hzZltwb3KEkjBjJHRKYrvgPusRhgZTBMCA56PR41ouQsINy4YeKwhH9ExoQLMEzMpCMxH9W_VphN7GTdKgM6XPO8VvRZh8X1TNVU”,
“width” : 3999
}
],
“place_id” : “ChIJZz7E3_2wyhQRnqgIh1qj-ys”,
“plus_code” : {
“compound_code” : “3WP7+63 Gaziosmanpaşa, İstanbul”,
“global_code” : “8GHC3WP7+63”
},
“rating” : 4,
“reference” : “ChIJZz7E3_2wyhQRnqgIh1qj-ys”,
“types” : [

Best regards,

Hi!

Have a view on this video

Regards,
NaNi

JSonObJ.SelectToken(“place_id”).Tostring

It says like this.

I need to extract place id from here ;

{
“html_attributions” : ,
“next_page_token” : “Aap_uEBxrnLtIPOPjOLou29PPaUyiCQhbgHNhKIlJYaYgkhgwoQpdxppIiGKf2R3YWs_auH2cmUk0c0ALfDG_e_CPCLAzyCxjQDXbOPGaqnZF-_cyIXI11oY7XdSfXeHRJrb5MnI2elgCp4E4RTnIzj3pgVkHGr90vlGx8dhnO3ZWOuW-LJZ7eS41xF3-xOjm5lTrpMVss4NKbDJl2Ppe6H5gNfYqqXKD4ZRoKGpw13eKMaPI2Yp6GDaC-r5TB5XRSRVsy5V18-kOwg-kmem7upoYOekgQG-oasKalHi8ctLVe0OzSUpz4nhsRL9nACjLLq6i7ENSHg7miErENomFn86eAN6jRbtyRv5uxCHeElUb6ZitgHkALECWw53y_kJv4WW_XG55YPuiHJ-4WhRu3Xp”,
“results” : [
{
“business_status” : “OPERATIONAL”,
“formatted_address” : “Rüstem Paşa, Sabuncuhan Cad. Eminönü No:53, 34110 Fatih/İstanbul, Turkey”,
“geometry” : {
“location” : {
“lat” : 41.0151682,
“lng” : 28.9697132
},
“viewport” : {
“northeast” : {
“lat” : 41.01653892989272,
“lng” : 28.97099392989272
},
“southwest” : {
“lat” : 41.01383927010727,
“lng” : 28.96829427010728
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/shopping-71.png”,
“icon_background_color” : “#4B96F3”,
“icon_mask_base_uri” : “https://maps.gstatic.com/mapfiles/place_api/icons/v2/shopping_pinlet”,
“name” : “Ark Kirtasiye”,
“opening_hours” : {
“open_now” : true
},
“photos” : [
{
“height” : 5312,
“html_attributions” : [
“\u003ca href="Google Maps”\u003eHERŞEY TV\u003c/a\u003e"
],
“photo_reference” : “Aap_uEBJe-tnZ_aWTXEvl8mzTgxzyIj9T9DTY52EF5rOBDweC8YMuJ9NIJaqkLJEhqOpWYGXePhSDrfFJrnfdl7kOHkXS0KBJxsnCNrLadJelt38CMlgYaGVxTjhh9SzvfNcHJIFeILCicQqNbXn-jy27uagKQ35SRrDVy546uc0zZzj56N3”,
“width” : 2988
}
],
“place_id” : “ChIJ2zw1rey5yhQRPTpRqew9-wU”,
“plus_code” : {
“compound_code” : “2X89+3V Fatih, İstanbul, Turkey”,
“global_code” : “8GHC2X89+3V”
}

Is there any solution?

So, what happens here is “results” provides a collection of JSON objects. What you need is to extract the value of jsonObject(“results”), parse it as a collection and then deserialize each item.

  1. Assign jsonObject(“results”) to a String variable
  2. Split that string variable into an array using “,” as the delimiter (String.Split)
  3. Put the resulting array into a for each
  4. Deserialize the items inside the for each and you should be able to do something like item(“place_id”)

Hey mate,

I’m newbie, can you send screenshot of process please if you can create for example ? :slight_smile:

Here you go, you may need to play around with it:

1 and 2

image
image

image

3 and 4

image
image

image