Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$json.decode

Decode JSON data.
$json.decode( json )
  1. json [string]
    JSON data string.

Notes

Qatrix will use native JSON.parse as possible.

Example

HTML code
<div id="box">{"John":{"age":20,"phone":"39-2039-492","email":"john@email.com"},"Tom":{"age":20,"phone":"39-2039-492","email":"john@email.com"}}</div>
<button onclick="start_decode()">start JSON decode</button>
JavaScript code
function start_decode()
{
	var data = $json.decode( $text($("box")));

	alert("John`s phone number is " + data["John"]["phone"]);
}
Demonstration
{"John":{"age":20,"phone":"39-2039-492","email":"john@email.com"},"Tom":{"age":20,"phone":"39-2039-492","email":"john@email.com"}}