Skip to main content

All Questions

Tagged with
0 votes
1 answer
38 views

I have been trying to upload a file to an api but getting this error Objects are not valid as a React child, use an array instead

I have been trying to submit a file to my API but I am getting this: Objects are not valid as a React child. If you meant to render a collection of children, use an array instead. Below is my code ...
Harshdeep Singh's user avatar
0 votes
0 answers
13 views

gettng error"Converting circular structure to JSON"

I'm making a static website using react, boot strap and tailwind. Whenever I try to render Service.js file in react app using react router, I'm getting below error. Uncaught TypeError: Converting ...
Nishant gopinath's user avatar
0 votes
1 answer
94 views

How can I make new arrays for each respective element inside of my object which consists of four arrays total to dynamically generate a week forecast?

I am back again! I am almost done with the same project from which my most recent question is also derived. I have hit a huge bump in the road. Pretty much, I am trying to make a 7 day forecast ...
vaahtlnirn1's user avatar
0 votes
1 answer
42 views

How can I access JSON nested obj to set state and display in React JSX?

I'm fetching a JSON object from my REST API @ "localhost:3001/customers/id" and trying to set it as state but I'm having trouble accessing my nested objects when trying to display the ...
Samara's user avatar
  • 3
1 vote
0 answers
18 views

How to get key value pair data from nested objects in reactjs? Here is the example that i want to achieve

help me out with the API response I have to work with [ { "attributes": { "vehColour": "Value", "vehMake": "Value", ...
Abhishek Ambure's user avatar
0 votes
0 answers
25 views

Making post request to a specific object within an array in db.json file

I am making a signup form in a react app. The form has five inputs; name, username, email, password, and favTeam. I want this info, when submitted to be sent to my backend (right now just a db.json ...
John C's user avatar
  • 1
0 votes
1 answer
18 views

Do I still need to create another use state to render each object in react js?

const [data, setData] = useState([]); const [input, setInput] = useState(""); const getWeather = async () => { const data = await fetch( `http://api.weatherapi.com/v1/...
Ronell Villamil's user avatar
0 votes
1 answer
32 views

React array map is duplicating array inside an array of objects

Creating a movie application and showtimes are embedded in an array of objects inside an array of movie objects. The times are duplicating and rendering out the movie 3 times if there are 3 showtimes ...
Marc Brolly's user avatar
1 vote
1 answer
38 views

Moving a value to another object in JSON React

I have a JSON file with days of the week and the opening and closing times of the store in seconds after midnight. { "friday": [{ "type": "open", "value": ...
Giovanna's user avatar
1 vote
1 answer
38 views

What's the easiest way to populate a ReactJS select field with user names from a JSON object array?

I'm trying to create my first project in React js and I need some help with select option. So, I have this JSON data file: { "users": [ { "id": "1", &...
Anton Tur's user avatar
0 votes
1 answer
555 views

Uncaught TypeError: Cannot read properties of null (reading 'chats')

I am trying to fetch the data from this API "http://3.111.128.67/assignment/chat?page=0" This contains an object with an array named chats. I fetched the data successfully, but when I tried ...
Gaurav Tak's user avatar
0 votes
1 answer
46 views

React json set array object without existing value

I have an array object (venue.products) that may or may not be prefilled depending whether it has been saved before. If its pre-filled (venue.products), the code works and I can update it but if not, ...
Theo's user avatar
  • 53
0 votes
1 answer
43 views

React JS set array object value

Totally loss although this must be simple? To this json 'client'. I am trying to set capacities[0].value to a value from input but fail. Thanks! [ { "Timezone": "VN", "Id"...
Theo's user avatar
  • 53
-1 votes
1 answer
29 views

merging 2 array of objects of different length based on same property [duplicate]

I want to merge 2 array of objects based on "foodtypeid"of arr1 == "id of arr2 and output a final array with all keyvalue pairs from arr1 and foodCategoryDescription,description,...
user21417943's user avatar
0 votes
1 answer
87 views

Passing a string as a property to use the map function

I have something like this { "title": "JSON", "content": [ { "item": "23", "url":"ug.coml" ...
Jacklyn N's user avatar

15 30 50 per page
1
2 3 4 5
18