Questions tagged as 'json'

2
answers

JSON PARSE returning 'object object'

I would like to know what is wrong with my function, because by assigning obj = data , it saves object object , the date value being a JSON returned by WEBSERVICE. Date value: [{"descricao":"Lorem ipsum dolor sit amet, consectet...
asked by 07.12.2018 / 15:34
3
answers

How to change an item in a json

I have a JSON Array something like this: [{ id: 1, total: 50.00 }, { id: 2, total: 70.00 }] I would like to know how to add / change an item to a id only. Like it was in SQL. For example, in the case I wanted to change the...
asked by 16.02.2015 / 18:18
2
answers

Keep order of items in JSON

Can you keep the order of items that came in JSON of a API ? This is how it comes from API :    {"6":"Abadia","218":"Abel Reis","44":"Alexandre Campos - Jardim","13":"Alfredo Freire I","174":"Alfredo Freire II","186":...
asked by 23.03.2018 / 19:37
2
answers

How to get a json on Controller and pass to array object

I'm having the following problem, I need to get the filtered objects in the Controller to export to report. I'm sending json using Ajax, but I do not know if the object is being sent to Controller, I gave a console.log (response) and the followi...
asked by 17.10.2018 / 14:39
2
answers

JSON equals an associative array?

Are the two the same thing? Or is JSON a more complex library or technique?     
asked by 20.11.2014 / 05:58
7
answers

Extract content Array for PHP variables

I have a cURL statement that invokes a WS. The response from this WS is stored through: $reference = var_dump(json_decode($exec, true)); return $reference; Given that I have this in one function, in the other file I read as follows: $var...
asked by 18.01.2017 / 16:37
4
answers

How to use Json in an html

What about people? I'm new here, could you help me ... is returning "NaN"! <!DOCTYPE html> <html> <body> <h1>Customers</h1> <div id="id01"></div> <script> var xmlhttp = new XMLHtt...
asked by 02.12.2015 / 14:28
4
answers

Deserialize JSON

I can POST this information: { "Nritem": 1, "Cdprevenda": 3, "Cdproduto": 7, "Decomplitem": "", "Descricao": "Depilação", "Dtcadastro": "2015-11-27T13:53:35.120Z", "Flsituacao": 1, "Md5": "", "Qtproduto": 18...
asked by 29.12.2015 / 12:27
1
answer

Return Json PHP to Ajax

Next I have a variable in client.php that prints: [{"CODIGO_CLIENTE":3,"CGC":"78.079.128\/0001-80","RAZAO":"Cliente 2","FANTASIA":"Cliente 2","TELEFONE1":"+99(99)9999-9999"}, {"CODIGO_CLIENTE":2,"CGC":"14.617.787\/0001-40","RAZAO":"Cl...
asked by 26.10.2016 / 13:25
2
answers

String deserialization

I got Retrofit the Drivers field from the following json: { "Drivers": [ { "DriverID": 0, "Latitude": -23.642276336, "Longitude": -46.634615118 }, { "DriverID": 1, "Latitude": -23.64227916, "Lo...
asked by 22.01.2016 / 16:22