Extracting ID from JSON string

robinrobin MemberPosts:100Guru
edited December 2018 inHelp

Hi

I am attempting to extract the id from a JSON string, the below process pulls the entire field required but for some reason it is not breaking the data out into the various columns. What am I missing to pull out the filed "._id"?

As a side note for some reason the JSON is also sending the id field as incremented, so in other word the id's come in sucessing with labels of [0]._id, [1000]._id, [1001]._id. I am not sure if this is having an impact on reading the data in?



















<运营商激活= " true " class = "文本:json_to_data" compatibility="7.5.000" expanded="true" height="82" name="JSON To Data" width="90" x="313" y="187">






















Tagged:

Best Answer

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn
    Solution Accepted

    From initial inspection the logic appears to be ok. Without the actual data file, its hard to diagnos but I do have some suggestions. I'm not sure why you use "select attributes and weights" on the Data to Documents operator? Maybe toggle that off. Also, would an Extract Information operator embeded inside the Cut Documents work for you? This way you can cut the JSON string and extract what you need.

    sgenzer

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    Would you please use the toggle box to post your XML, it's corrupted for some reason.

  • robinrobin MemberPosts:100Guru
















    <运营商激活= " true " class = "文本:json_to_data" compatibility="7.5.000" expanded="true" height="82" name="JSON To Data" width="90" x="313" y="187"/>








    < =“query_type”价值=参数的关键"JsonPath"/>






























  • robinrobin MemberPosts:100Guru

    What the output is looking like:

    [0]._id

    [0]._links.people.href

    [0]._links.people.method

    [0]._links.self.href

    [0]._links.self.method

    [0].created

    [0].handles_count

    [0].operation

    [0].percent_complete

    [0].person

    [0].search_key

    [0].status

    [0].total_handles

    [0].updated

    [1000]._id

    [1000]._links.people.href

    [1000]._links.people.method

    [1000]._links.self.href

    59b149368066510579744f83

    /v2/api/import/twitter/requests/59b149368066510579744f83/people

    GET

    /v2/api/import/twitter/requests/59b149368066510579744f83

    GET

    2017-09-07T13:27:18.578000+00:00

    1.0

    Individual

    0.99

    59b1493b80665106cfb4c871

    Screen_name

    Finished

    1.0

    2017-09-07T13:27:23.924000+00:00

    59ac4ea58066510579743c2e

    /v2/api/import/requests/59ac4ea58066510579743c2e/people

    GET

    /v2/api/import/requests/59ac4ea58066510579743c2e

  • robinrobin MemberPosts:100Guru

    Thank you

Sign InorRegisterto comment.