How to access values in JSON object?

This question already has an answer here:

  • Parse JSON in JavaScript? [duplicate] 16 answers
  • Serializing to JSON in jQuery [duplicate] 11 answers

  • i think you can use direct JsonResult and should work

    [HttpPost]
    public JsonResult UploadFiles()
    {
    // save file..
    return Json(new { action_success = "true", newIndex = 2 });
    }
    

    and on client side if you are using $.ajax() then set datatype as json

    链接地址: http://www.djcxy.com/p/8092.html

    上一篇: 通过JSON解析Array儿童值

    下一篇: 如何访问JSON对象中的值?