Tag: json

how to read arabic in json object

i am using extjs as front end tool my requirement is to show the arabic data from application properties to json grid in extjs.but the problem is it is showing only question marks any help would be appreciable Thanks.

Convert Javascript Date Object to JSON date

I’m trying to convert a timestamp made by var now = new Date().getTime(); which creates the timestamp 1349916512100. I want the date to be formatted like \/Date(1349916512100)\/ to be used in a JSON string, right now I’m just concatonating the \/Date and \/, (like the example above) but is there a better/proper way to do […]

How does this need JSON to be resolved at all?

I run into a little problem that needs your help. I am coding in a Joomla module, but this is not really a problem to all those who are not Joomla-friendly. In a Joomla’s module, there will be a folder named tmpl (template for short I think) that contains a little file default.php, which is […]

jQuery – How to remove cross domain limitation

This question already has an answer here: Ways to circumvent the same-origin policy 11 answers

In JavaScript, is there a way of parsing JSON that turns numbers into strings?

As JavaScript uses floating point maths for all numbers, which does not preserve precision in all cases, I want to parse a JSON object containing numbers but generate strings in the returned JavaScript object rather than number objects. Is there a way to do this using standard or third party libraries?

JIT ForceDirected Graph with fixed node position

My web service returns json with all nodes of a grath set. I’m using the JIT for visualisation. Does JIT allow to set positions of each node inside json? Or is there any javascript library which allows this?

Remove “\” from strings in javascript

I’m having some trouble removing slashes in Javascript. I’ve got some HTML coming through via JSON and need to get rid of the escaping slashes. Here’s what I have now, but it doesn’t seem to work – at all… obj.embed_code = obj.embed_code.replace(/\\/g, ”); The HTML inside that object is an embed iframe from YouTube, but […]

Javascript send href without clicking?

I’m not sure if this is possible. I have a link like this <a id=”addCart” href=”http://mydomain.foxycart.com/cart?name=test-product&price=10.00″>Add to Cart</a> This link, when clicked, sends the values to a json shopping cart on another server. However I have a situation where I need to send similar values with this href link but without being clicked. e.g: $(‘.name’).each(function() […]

403 Forbidden in Google Chrome (only) when I call twitter search with Jquery (ajax)

I have this issue with Google Chrome (v26.0.1410.64m). When i call Twitter search with jquery, i get the following error: GET https://search.twitter.com/search.json?q=youtube&rpp=5&result_type=recent&callback=jQuery19101530768966767937_1365645647773&_=1365645647774 403 (Forbidden) This is the code i used : $.ajax({ type: “GET”, url: “https://search.twitter.com/search.json?q=youtube&rpp=5&result_type=recent”, contentType: “application/json”, dataType: “jsonp”, success: function(data) { console.log(data); } }); On Firefox, Internet Explorer, Safari and Opera this is […]

JavaScript-How to check for a value from a Json array having multiple nodes and arrays?

I have a JSON data that is in the below format. I need to get the store name corresponding to the one which has specialDeal as true in “Non Veg”. (NOTE: Only one of the stores will have specialDeal as true) How will i retrieve it. Please help. thanks in advance .. Please help me […]