Questions tagged as 'json'

2
answers

How do I extract the field values from a javascript Object (JSON)?

I have a Javascript object, eg: var pessoa = {nome: 'Carlos', cpf: '123', rg: '456'}; I need to list the fields that this Object has and the corresponding values.    To list the fields I have achieved the following: Object.keys(pessoa...
asked by 16.05.2016 / 18:44
2
answers

Deserialize array in Json

I'm accessing an API and the return is an array with latitude and longitude respectively. Unfortunately, I can not deserialize because it does not have properties in Json. How can I do to achieve this in C #? Return: [[-23.45317,-46.7071...
asked by 27.04.2016 / 09:13
1
answer

How to display a json return in a listView

I'm trying to return a json that resulted from a select done in php (web service) for my application. The select is here: mysql_connect('localhost','root','ugauga'); mysql_select_db('noise') or die (mysql_error()); $Cod_Empresa = $_GET['...
asked by 19.04.2016 / 19:24
1
answer

How to convert certain group of columns to JSON?

I have the following problem: I have a table with N columns, but I would like to make almost all of them into a single column of type json, eg: id, json(col2,col3,col4) as dados I looked at the documentation, and found a command that...
asked by 26.03.2016 / 01:45
1
answer

Receive response from a restful web service java on Android

I'm developing an Android application and would like to know how do I get a response from the server, the technology I'm using on Android is the retrofit 2. After sending a POST request, how do I get a response from the server and from that info...
asked by 17.05.2016 / 22:41
3
answers

How to group equal values with JSON

Using the following code construct a select of options: $(document).ready(function () { var customersSource = { dataType: "json", dataFields: [{ name: 'Estado'},{ name: 'OrderID'}], url: 'cus...
asked by 14.03.2016 / 13:07
1
answer

Display | Scrub a field when selecting data in Select

In this code the select appears with the Cities grouped as desired, but I would like to click on any of the select 'store' options to open in a table below the selected store address only. HTML <div> <select id="cities"></sele...
asked by 14.03.2016 / 15:51
1
answer

Filtering json data with schema attribute

I have JSON in this format: { "1": { "cidade":"cidade1", "name":"nome1" }, "2": { "cidade":"cidade2", "name":"nome2" } } I need to filter the data from this json. For this I made a model.js var mongoose = req...
asked by 25.05.2016 / 22:25
2
answers

PDO Array mySQL with Json display error

I'm having a hard time json_encode echo json_encode($autocomplete -> fetchAll(PDO :: FETCH_ASSOC)); I'm doing a select from the database so fine, but when it transfers the data to this echo from above, many characters appear that javascr...
asked by 03.03.2016 / 17:41
1
answer

Select option to select otherwise with AngularJS

I recently found this example in JSFiddle to select given option in a select element. I noticed that it is selected as follows: HTML : <div class="listitem" ng-repeat="Choice in Person.Choices"> {{Choice.Name}...
asked by 10.02.2016 / 19:31