How to separate coma in json result ( React Js)

Active3 hr before
Viewed126 times

7 Answers


i want to separate coma in JSON result and use in my React JS, Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers ,Stack Overflow en español

const link = "http://photo..."
const data = "[\"photo1\",\"photo2\",\"photo3\",\"photo4\"]";

const result = JSON.parse(data).map(x => link + x);


 Pretag team - issue, fix, solve, resolve

JSON is basically a collection of name/value pairs, where the name will always be a string and values can be a string (in double quotes), a number, a boolean (true or false), null, an object, or an array. Each name-value pair will be separated by a comma. JSON is a text format that is completely language independent, and it is an ideal way of exchanging data.,I hope this guide was helpful in understanding the basics of JSON, React, JSX, and how to render different types of values efficiently to create meaningful user interfaces.,Objects and arrays are useful for representing and sharing complex nested data.

1 {
   2 "string": "Pluralsight",
      3 "number": 1,
      4 "true": true,
      5 "false": false,
      6 "null": null,
      7 "arrayOfStrings": ["a", "b", "c", "d"],
      8 "arrayOfNumbers": [1, 2, 3, 4, 5],
      9 "arrayOfBooleans": [true, false, true, false],
      10 "arrayOfObjects": [{
         "a": 1
      }, {
         "a": 2
      11 "object": {
         12 "anyKey": "anyValue"
load more v

Read the csv file using default fs npm package.,How to convert JSON string to array of JSON objects using JavaScript ?,How to get value of selected radio button using JavaScript?


Starting with ECMAScript 5, trailing commas in object literals are legal as well:,ECMAScript 2017 allows trailing commas in function parameter lists., Trailing commas in objects were only introduced in ECMAScript 5. As JSON is based on JavaScript's syntax prior to ES5, trailing commas are not allowed in JSON.

load more v

Values inside the array are separated by comma (,).  ,All the values in array must be separated by comma (,). ,JSON Data Types and Objects:- As in every programming language JSON also has its data types, below are the list of data types which JSON format supports. JSON has 3 types of data types. 

 Pretag team - issue, fix, solve, resolve

 Pretag team - issue, fix, solve, resolve

Other "separate-react" queries related to "How to separate coma in json result ( React Js)"