我有一个名为page.cat.lastResponseText
的JavaScript对象。
此对象具有以下字符串值:
{
"orderBy":"",
"orderDesc":false,
"rows":[
{"catIndId":"3","indId":"1","catId":"2"},
{"catIndId":"4","indId":"4","catId":"2"}
],
"totalResults":2,
"totalPages":1,
"pageSize":2,
"currentPage":1
}
如何将此字符串转换为JSON对象?然后我如何获取对象的值,例如 cat.rows 或 cat.totalResults ?