Questions tagged as 'json'

2
answers

JSON handling returned from PHP

I would like to know how to manipulate data from JSON below. If the structure is correct, and if not, how do I change the structure of it? { "postagens":[ { "URLIMG":"1.jpg", "NOME":"Jhonatan", "SOBRENOME...
asked by 04.11.2015 / 01:47
2
answers

Add a value to a JSON object

How can I add a string of values to a JSON object? For example: var a = 12; var b = 3; var obj = { c: 11, d:22 } console.log(obj); How can I apply to and b within my obj variable to become part of this JSON object?     
asked by 04.05.2016 / 20:45
1
answer

JAVASCRIPT ARRAY (map and reduce)

How's personal? I have this array here: [ {dia:2,turno: turno1,M:1,T:0,N:0}, {dia:2,turno: turno2,M:0,T:2,N:0}, {dia:2,turno: turno3,M:0,T:0,N:1}, {dia:3,turno: turno1,M:122,T:0,N:0}, {dia:3,turno: turno2,M:0,T:21,N:0}, {dia:3,...
asked by 17.12.2018 / 07:19
3
answers

Get function in service.js returns null

I have a Json of categories with an array of products inside it. Search all categories and all products according to category, you are looking for. Now the problem is that I want to return the detail of the product by product id, but in the cons...
asked by 02.03.2016 / 17:51
2
answers

Google Maps with file_get_contents error. What can it be?

I am implementing Google Maps on a real estate website and I have a problem to solve: the request gives% error of% ... Soon in the middle of the code is the result of the variable file_get_contents($url) which if I copy and paste it in...
asked by 30.09.2014 / 18:15
1
answer

Send integer as string in a JSON

I have a problem returning a very large integer value in JSON type: {“matricula”: 201737909200976697} What happens is that in return is bringing 201737909200976700. This occurs with any large integer like this one with 18 digits, so I wa...
asked by 08.11.2018 / 13:02
2
answers

Add json object property

I have a json object and need to multiply the value vlr_produto with the function add() data={ id: 6, nome_produto: "Produto", vlr_produto: 16.98, qtd: 0 } add(data) { var mult = data.qtd++; mult * data.vl...
asked by 02.08.2018 / 12:35
1
answer

turn string into javascript array

Good afternoon, I have the following string [{"programa":"teste"},{"programa":"Aprender"},{"programa":"outro teste","indice":"0;1;0"}][{"programa":"Programando 1","indice":"1;2;3"},{"programa":"hostórico","indice":"1;2;2"},{"programa":"anál...
asked by 23.07.2018 / 20:01
1
answer

How to Capture this array

I'm trying to make an API . Here is my code: require('conexao/conexao.php'); $jsonObj= array(); $query="SELECT * FROM filmes"; $sql = mysql_query($query)or die(mysql_error()); while($data = mysql_fetch_assoc($sql)) { $row[] =...
asked by 14.02.2018 / 21:14
1
answer

How to save JSON data to the hard drive? (or access them with javascript)

I'm working on an application to study the syntax of languages used on the web (html, css, javascript and etc ...) through a question and answer mini-game, but my problem has been how to save that data . The method I learned is this below:...
asked by 24.02.2018 / 16:31