Questions tagged as 'json'

2
answers

What's the difference between using toString () and JSON.stringify ()?

var arr = [1,2,3]; arr.toString(); // "1,2,3" JSON.stringify(arr); // "[1,2,3]"     
asked by 02.10.2018 / 01:25
3
answers

consuming JSON

I'm having trouble getting a JSON file from the internet. I have some data in this link link and I want to get it to use in my application, the link returns something like: { "Categorias":[ { "nome":"Black", des...
asked by 16.12.2014 / 18:42
3
answers

How to View Json in PHP

I get a user from a DB via API. <?php require "vendor/autoload.php"; use Intercom\IntercomClient; $client = new IntercomClient(App_ID, App_Key); $client->leads->getLeads(['email' => '[email protected]']); ?>...
asked by 17.08.2016 / 14:25
3
answers

How to check if Ajax's return is JSON or String?

My code looks like this: sendAjax(new FormData(this), function(retorno) { if(retorno.isArray) { $(".erro-login strong").text("ID: " + retorno.id + " usuário: " + retorno.usuario); $(".erro-login").show("slow");...
asked by 17.05.2016 / 20:44
2
answers

What is the difference between ~ 0.0.1 and ^ 0.0.1 in the version control of package.json packages?

This code is an example: { "dependencies": { "gulp": "~0.0.1", "browser-sync": "^0.0.1" } }     
asked by 10.02.2017 / 18:10
6
answers

How to display php / mysql and AngularJs data?

I'm trying to do a test with PHP + MySQL + AngularJS and I was left with a question about how to handle the bank data with angular and send to screen, I have the following codes: con-bd.php <?php .... $conn = mysqli_connect($host, $us...
asked by 14.04.2015 / 14:13
2
answers

How to get the JSON return via jQuery?

I have a Click to Call link that returns me a JSON. How do I get the data generated in JSON via jQuery? Link: http://192.168.0.6:8080/G4FlexWS/rest/flexuc/clicktocall/ext/telefoneOrigem/telefoneOrigem/telefoneDestino Return in JSON:...
asked by 28.05.2014 / 14:29
2
answers

How to count the number of occurrences of a String in a JSONArray?

I'm trying to show the Strings of " specialty " strings that are in my JSON, but when I try to show the count of each "specialty" I can not succeed. JSON [ { "id": "20", "medico": "ACASIO MENDES", "paciente": "APARECIDO SOUZA...
asked by 11.09.2017 / 19:11
2
answers

Error catching field of a JSON?

I'm having an error when I try to retrieve a field from a array . Follow json : { "data": { "messages": [ { "id": 1, "sender": "[email protected]", "recipient": "re...
asked by 27.10.2016 / 15:13
3
answers

How to list a json object to generate a txt file and download that file via ajax request?

I have an ajax request that sends a large object. That in the browser console is seen like this: Object {data: Array[4936], paging: Object} The following is the requisition code: $.ajax({ type: "POST", url: "gerararquivo.php",...
asked by 17.06.2015 / 19:31