Ruby - Parsing JSON-building



  • There's a line after JSON's password:

    {
      "status"=>"ok",
      "meta"=>
        {
          "count"=>1
        },
      "data"=>
        {
          "8"=>
            {
              "creator_id"=>32405797,
              "recruiting_options"=>nil,
              "leader_id"=>61286817,
              "description"=>"...",
              "creator_name"=>"...",
              "color"=>"#756D95",
              "clan_id"=>8,
              "created_at"=>1438734986,
              "updated_at"=>1449518817,
              "leader_name"=>"...",
              "members_ids"=>
              [
                2160046, 2172167, 2727455, 4135104, 4667154, 7591288, 7983406, 14092742, 15669731, 19205921, 20141381, 22561097, 28397844, 30358570, 30994384, 31344478, 32405797, 32644252, 33185735, 34644161, 34817735, 35159051, 35176170, 35442556, 35501660, 35593937, 35736155, 36021979, 36409340, 36493500, 36791942, 40210735, 40325047, 40808394, 41435418, 41538404, 41999796, 42422041, 47792722, 48239548, 57203652, 57538797, 61286817
              ],
              "recruiting_policy"=>"restricted", 
              "tag"=>"...", 
              "is_clan_disbanded"=>false,
              "old_name"=>"...", 
              "emblem_set_id"=>10011,
              "members_count"=>43,
              "motto"=>"...", 
              "renamed_at"=>1439995383, 
              "old_tag"=>nil, 
              "name"=>"..."
            }
        }
    }
    

    How to get all the readings members_ids?



  • I've got your hosh, Irb. Massive "members_ids" It's here:

    <Переменная с хэшем>['data']['8']['members_ids']
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2