JSFiddle - React, Tailwind, and code Playground
by mrigess
HTML
<h3>Testing JSON responce!</h3>
JavaScript
Ext.onReady(function(){
Ext.Ajax.request({
scope: this,
url: '/echo/json/',
params: {
json: Ext.JSON.encode({
CONTENT_ID: 'some id like 1234123123t',
array: [1, 2, 'three'],
object: {
par1: 'another text',
par2: [3, 2, 'one'],
par3: {}
}
}),
delay: 1
},
headers: {
'Accept': 'application/json'
},
success: function(response) {
var jsonData = Ext.JSON.decode(response.responseText);
alert(jsonData.CONTENT_ID);
alert(jsonData.object.par1);
}
});
});