Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用符号AND解析JSON数据?_Javascript_Json - Fatal编程技术网

Javascript 使用符号AND解析JSON数据?

Javascript 使用符号AND解析JSON数据?,javascript,json,Javascript,Json,我试图从以下JSON中提取变量?使用javascript的格式化响应: { "result": { "buffer": [84,73,77,69,83,84,65,77,80,61,50,48,49,52,37,50,100,48,51,37,50,100,49,51,84,50,48,37,51,97,48,56,37,51,97,53,54,90,38,67,79,82,82,69,76,65,84,73,79,78,73,68,61,52,101,100,50,49

我试图从以下JSON中提取变量?使用javascript的格式化响应:

{
    "result": {
        "buffer": [84,73,77,69,83,84,65,77,80,61,50,48,49,52,37,50,100,48,51,37,50,100,49,51,84,50,48,37,51,97,48,56,37,51,97,53,54,90,38,67,79,82,82,69,76,65,84,73,79,78,73,68,61,52,101,100,50,49,48,52,57,53,101,57,54,50,38,65,67,75,61,83,117,99,99,101,115,115,38,86,69,82,83,73,79,78,61,57,51,38,66,85,73,76,68,61,49,48,48,51,48,49,53,56],
        "cookies": {},
        "headers": {
            "Connection": "close",
            "Content-Length": "104",
            "Content-Type": "text/plain; charset=utf-8",
            "Date": "Thu, 13 Mar 2014 20:08:56 GMT",
            "Server": "Apache"
        },
        "status": 200,
        "text": "TIMESTAMP=2014%2d03%2d13T20%3a08%3a56Z&CORRELATIONID=4ed210495e962&ACK=Success&VERSION=93&BUILD=10030158",
        "uuid": "6bd97902-33fd-70d8-8a30-cebd03756d38"
    }
}
所以,如果我使用httpResponse.text

"TIMESTAMP=2014%2d03%2d13T20%3a08%3a56Z&CORRELATIONID=4ed210495e962&ACK=Success&VERSION=93&BUILD=10030158"
现在,既然我觉得这不是JSON格式,那么提取单个字段的最佳方法是什么?我总是可以使用
split(&)
生成一个数组。这是一个更简单的方法。非常感谢您的任何想法

此外,这是在Parse.com云代码上运行的。我不认为Parse支持jQuery,但我可能错了

编辑:我知道这是一个一轮的工作。。。。但这对我有用。。。!简单多了

        var myText = httpResponse.text;
    var mySuccess = myText.match(/Success/g);

httpResponse.text
中的值与查询字符串的格式相同

您可以看到关于如何解析它们的答案: