How to retrieve data from that text format?

apiResult

I think this is json format idk. I am getting this data from a query. I have it as a text but how can i retrieve first data (its 444 in here) and how can retrive second data ( which is date).

There are thousands of data like this.

Btw after getting the second column(“sfiyat_create_date”) i ll split it and get only date(dd/mm/yyyy)

Can you guys please help me ???

use deserialize json activity and use deserializedJson(“sfiyat_fiyati”).ToString()deserializedJson("sfiyat_create_date).ToString() to get the data

1 Like

how can i use them ??

Hi Eyup Hasan Akbaba,

First pass this API result to the activity Deserialize Json After that, store the result inside the Jobj_Response variable, which will be the type of JObj
So the first data point you can get by doing the following

  1. Jobj_Response(“sfiyat_fiyati”).ToString()
    And the second data point you can obtain by doing this is:
  2. CDate(Jobj_Response(“sfiyat_create_date”).ToString()).ToString(“dd/MM/yyyy”)

how about only this {“sfiyat_fiyati”:222} ???

ApiRESULT = {“sfiyat_fiyati”:222}

Type of ApiRESULT = String

Can i use split ??? and get only data after ( " : " )

:thinking:

This is a json string right…so use deserialize json activity…don’t go for split…the output for deserialize json activity is a json object …

Jsonobject(“sfiyat_fiyati”).toString gives you the required result

The RPA product i am using is not Uipat so i do not have deserialize json activity

image

I used code editor in the RPA Program but i am getting some kinda error.

What error you are getting?

Hi @170290064 ,

Could you let us know what was the error that you have received, Also let us know the RPA Program that you are using ?

We will most probably be able to provide you with verified implemented solutions here with UiPath than other RPA tool implementations. However, if the underlying framework or code base is .Net framework or .Net Core, then the most of the .Net code implementations working in UiPath should also work with the tool you are using.

Let us know the error, so we could understand further on what needs to be done.

Also, We see that a similar topic is created by you, we would ask you to not create Duplicate topics :

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.