Questions tagged as 'json'

1
answer

Compare 2 arrays and create a new array if they have the same ID

I have 2 arrays: array1 = [ ... { "id_projeto": 4, "sigla": "ADM-APR", "nome": "Administração APR", "descricao": null, "atividades": [ 13, 14, 49, 80, 81, 82 ] // id } ... ]; array2 = [ ... } "id_atividade": 49, //id...
asked by 02.11.2017 / 10:23
3
answers

JSON handling with JAVA

Through JAVA, I need to make a request via POST, where I get a JSON with a token. The JSON return I get after sending the POST is this: { "Token": "e27bb0a7-e65b-4cc3-a82e-7a2a3c26a248", "Codigo": 0 } How do I make t...
asked by 14.11.2017 / 13:54
1
answer

Laravel 5.3 update field JSON MySql - # 3143 - Invalid JSON path expression

Query generated by laravel: update 'informations' set 'parameters' = json_set('parameters', "$.'Campo teste'.type", 'string'), 'parameters' = json_set('parameters', "$.'Campo teste'.value", 'Novo valor') where 'parameters'->'$."Identificaçã...
asked by 24.08.2017 / 18:16
1
answer

Get json object inside another object of another object

I need to get the object online that is inside the "players" object but I can not get it ... I can only get objects that are "In the root" json where I need to get: { "status": true, "hostname": "skyminigames.com.br", "port": 25565...
asked by 03.05.2018 / 20:12
2
answers

How to create associative arrays in javascript, json, how to manipulate?

It's the first time I'm dealing with this situation, so I do not know exactly how to get around it. The fact is this, I have a form with several inputs, divided by sections: IntheExperienceTab,IfillinsomeinputswiththedataandwhenIclickaddIcreate...
asked by 15.06.2017 / 06:31
2
answers

Import JSON to Database

I have a json file, and would like to import it into a database. Is there any way to automate this process? There is no database preference, but if it had some function for PostgreSQL it would be better.     
asked by 28.09.2017 / 16:19
2
answers

How to bring the typed data and store in a json to do the treatment after?

I would like to get the data typed in my form and put it in a json, but I do not know how to do it. My HTML form looks like this: <form action="" class="formContent" id="myform"> <div class="row form-input" id="form"> <div...
asked by 20.02.2017 / 15:14
1
answer

How to put a class inside a JSON

Does anyone know how to put a class inside a JSON file? I need to save a class inside a JSON file, however, it returns that this file is not serializable. Does anyone know how I can put this class inside the file, and then use it? Ex: import j...
asked by 06.07.2017 / 15:30
1
answer

Picking items from the JSON array

I'm working with api from youtube and a query returns the json below. How do I get and print each item separately? For example I want to print each "videoId". How do I do? { "kind": "youtube#activityListResponse", "etag": "\"I_8xdZu766_FSaex...
asked by 25.09.2016 / 00:32
1
answer

List errors returned in an ajax request

I have a Controller that is returning errors like this: return response()->json(['erros' => $this->renderHttpException($e)]); I'm getting this json as a response to the ajax request: {"email":["The email field is required."],"tel...
asked by 23.09.2016 / 20:30