Questions tagged json

Explore the latest questions and answers asked by our top developers.

Does the this keyword in js reference the calling function or the function owner? [duplicate]

I have two functions Product and Food, the Food calls the product function passing this as an argument. I want to know if the keyword this is a reference to the function Product or the calling function Food. function Product(name, price) { = name; this.price = price; } function Food(name, price) {, name, […]

By Chinedu
Categorized as angularjs, function, javascript, json, node.js Tagged , , , ,

Is it possible to output a JSON object row by row in Angular?

I have a field "properties" in my table(data type: text). In this field there is a JSON object. Now I want to output it in Angular in a reasonable way as I have shown below. Currently only the JSON format is displayed. There must be a way to display the attributes of a JSON format […]

By Doncarlito87
Categorized as angular, json Tagged ,

How to add/remove fields dynamically by just updating the JSON? Angular 8

Make the validation of fields dynamic. Meaning the validation message and mandatory checking must be driven from a configuration that is editable as a JSON file. The mandatory checking(*) should be initialized using the configuration. The error messages should be implemented via configuration. All checking should be done at the save click. After the implementation […]

By Jinu Joseph
Categorized as angular, angular8, angularjs, json, typescript Tagged , , , ,

Angular HttpHeaders not populating

I am trying to do an API call with Angular that has custom headers. My problem is that my headers variable seems to not care about the values I try to put in it, no matter what I do. console.log(this.monBateau); let headers = new HttpHeaders(); headers.append(‘gvl’ , this.monBateau[‘gvl’]!); headers.set(‘gvsl’ , this.monBateau[‘gvsl’]!); headers.set(‘length’ , this.monBateau[‘longueur’]!); console.log(headers.has(‘gvl’)); […]

By very nice user
Categorized as angular, json, typescript Tagged , ,

Angular ngx-translate usage in typescript object array

I am using ngx-translate for translation. In my typescript file I have a array of objects. how can I use a i18n key in this array? shortcutList: Shortcut[] = []; constructor(private translate: TranslateService){} this.shortcutList = [ { text: this.translate.get(‘shortcuts.some-key’), icon: ‘fa-calendar-alt’}, { text: this.translate.get(‘shortcuts.some-key2’), icon: ‘fa-users’}, { text: this.translate.get(‘shortcuts.some-key3′), icon:’fa-archway’} ]; I need a simple […]

By Babulaas
Categorized as angular, json, ngx-translate Tagged , ,

Show Json object properties

In my application I have json array and I can display those data. all data have radio button. what I want is when I click on radio button, data of that json array item will print in html format in another component. Something like below. This is how it is showing withing my product.component.ts I […]

By Dinithi
Categorized as angular, json Tagged ,

From an array of objects, extract value of a property as array in angular

I have an array that looks like below: [ { "name":"ABC", "group":"A" }, { "name":"XYZ", "group":"A" }, { "name":"KLP", "group":"A" }, { "name":"AKG", "group":"B" }, { "name":"DIS", "group":"B" }, { "name":"FAC", "group":"B" }, { "name":"TAM", "group":"B" }, { "name":"NEW", "group":"C" }, { "name":"UTL", "group":"C" }, { "name":"WAC", "group":"C" } ] How can I sort this […]

By Khushboo Patel
Categorized as angular, arrays, json, object Tagged , , ,

serialize array into object in JSON for API

I am working on Angular 12, in my TS file I have an array response from a file upload like this- [ { "id": "7", "name": "xyz", "job": "doctor", "preference": "1" }, { "id": "7", "name": "xyz", "job": "nurse", "preference": "2" }, { "id": "7", "name": "xyz", "job": "manager", "preference": "3" }, { "id": "7", […]

By sharpshooter
Categorized as angular, arrays, javascript, json, typescript Tagged , , , ,

How to access json data which is present in payload of angular request in springBoot post API || syncfusion angular calender

Getting the below data in the payload tab of my browser while sending post requests. "–batch_8c82e185-cbdf-4d70-a62d-a48c9e869bf8 Content-Type: application/http; msgtype=request POST /api/null HTTP/1.1 Content-Type: application/json; charset=utf-8 Host: localhost:4200 {"Subject":"ankita","StartTime":"2021-11-29T04:00:00.000Z","EndTime":"2021-11-29T04:30:00.000Z","IsAllDay":false,"StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"Id":4} –batch_8c82e185-cbdf-4d70-a62d-a48c9e869bf8–" Note: I am using a third-party library(syncfusion calendar) where I can’t customize my request in the body part with JSON. I am only concerned with the […]

Angular Rowspan for table created using JSON object

In Angular I have an array of object as follows: The object needs to be rendered as the table given in the image style. Each row contains a main category and a sub-category with records under each sub-category. The rowspan for the main category column should be equal to total sum of no.of records in […]

Categorized as angular, html, html-table, json Tagged , , ,
1 2 3 121

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us