Questions tagged as 'json'

1
answer

How to calculate Total via JavaScript

To show the items in a sale I use a Json to display the data using this script. <script> $(document).ready(function () { var CodigoVenda = @ViewBag.CodigoVenda; $.ajax({ type: "GET", url: "/Venda/GetDadosIte...
asked by 30.11.2015 / 21:04
4
answers

convert json to php object

UPDATE I found this answer from SOen , at the link suggested by @Pedrox, talks about reflection , would it apply to this case too? As I've already been told here in the SOpt , I was trying to convert a list of objects to json. Well,...
asked by 11.11.2015 / 14:33
1
answer

Index and automatic values

I have the following Json: {"result":[ [ {"ID_CTE":"1","ABREV":"301CAGSP","MODELO":"CT","NUMLANCTO":" 71","NUMCONHEC":" 5911","NUMFATURA":"0000173","NUMREMET":"23.643.315\/0094-51","NUMDESTIN":"23.643.315\/0110-06","NUMRED...
asked by 28.07.2015 / 20:43
1
answer

Number of elements in JSON

How can I find out the amount of elements of a json file through PHP. See my example file: [{"descricao":"Fotografia","codigo":784},{"descricao":"Filmagem","codigo":789}] I would like to check the amount of elements, which in this case s...
asked by 08.06.2016 / 19:26
1
answer

Insert JSON file into JSFiddle

I'm trying to solve a question with a plugin that uses jQuery but I do not know how to insert a JSON file into JSFiddle. This JSON is a string and comes from a .json file.     
asked by 06.12.2015 / 08:19
2
answers

How to overtake XMLHttpRequest can not load?

This error appears to me. How to overcome it?    XMLHttpRequest can not load "url example". In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Code var url = "htt...
asked by 14.04.2015 / 11:48
1
answer

Search for a word in a JSON result

Personal I have the following JSON: "results": { "collection1": [ { "prod": { "text": "COLCHÃO NAUTIKA KING SIZE" I have a search form: <form id="search" method="POST"> <input type="text" name="search" />...
asked by 31.07.2015 / 22:13
2
answers

How to mount a JSON return?

I have this code, below, where I manipulate some data. But after, I need to transform into a JSON object, like the example below. <?php function mostraContasEntrada($id_empresa){ $pdo = conectar(); $this->mostraDadosEntrada=$pdo-...
asked by 10.11.2015 / 01:00
1
answer

How to traverse attributes of a JSON?

I'm trying to traverse attributes of a json, I'm trying that way for (var i = 0, length = r.length; i < length; i++) { for (var i2 = 0,length = r[i].lenght; i2 < length; i2++ ){ console.log("teste"+r[i][i2]); } } How...
asked by 27.10.2015 / 13:06
1
answer

What is the correct MIME type?

In order to allow data to be exchanged between the server and the browser, a number of means are usually adopted, for example when returning an existing dataset in the database using JSON . There are these here: application / json appl...
asked by 17.10.2015 / 02:12