开发者

How to get key value

My sample JSON string is as below:

{"8776337":{"text":"Test Message","status":"d","created_time":"1244475327","reply开发者_JAVA百科_number":"447624800500","completed_time":"1244475373","credits_cost":"0.4"}}

"8776337" is dynamic key returned by some APIs. I want to get this key value using LINQ to JSON query.

How can I get this key value using LINQ to JSON?


I know how to get this value with javascript:

function test()
{
var p = {"8776337":{"text":"Test Message","status":"d","created_time":"1244475327","reply_number":"447624800500","completed_time":"1244475373","credits_cost":"0.4"}};
  for (var key in p) {
      if (p.hasOwnProperty(key)) {
        alert(key);
      }
    }
}

then it would be easy to send it to the server side!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜