There is such a json
"threads": [{"posts": {"banned":0, "closed":0, "comment":}}] How to get data from comment from here?
I have this code
require 'rubygems' require 'json' require 'httparty' file = File.read('test.json') data_hash = JSON.parse(file) posts_count = data_hash['posts_count'] posts = data_hash['posts'] threads = data_hash['threads'] length = threads.length p threads What to add to make it work? Because when I enter
comment = data_hash['comment'] p comment he gives out nil
p data_hashat the end and attach the output to the question. - MAXOPKAcommentfield. - anoam