python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Within a JSON string how does one for all string values of a given key replace any occurrence of a specific substring?
I'm looking for a way to replace a given string in a JSON by another string, but only for a certain key. For example, suppose I have the following JSON, data:
[
{
"name": "p...

Adam
Votes: 0
Answers: 2
Uncaught (in promise) TypeError: Converting circular structure to JSON only in my put calls
So I'm making a put call:
const updateAPIData = (userId) => {
axios.put(`https://localhost:44373/api/Users/${userId}`, {
userId,
firstName,
lastName,
...
DojaCat
Votes: 0
Answers: 1
Convert a array of strings into string for the csv
I have following array of strings.
const test = ["Date,type,user,Account,Desc\r",
"1 jan 2021,RR,GK,,Testing acc\r",
"1 jan 2021,RR,GK,,Testing acc\r",
"...
ganeshk
Votes: 0
Answers: 1
How to make JSON array string to newline string in js?
In React I'm trying to render the JSON data I'm getting from the server to readable data.
Here is the string from the server
"[{\"mat_type\":1,\"mat_title\":\"Title1\&quo...
xxxhomie21
Votes: 0
Answers: 2