Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const myObject = {
- [_selectedDay] :
- {
- toDo:'workout',
- selected: true,
- }
- }
- //I expaned [0]
- (5) [{…}, {…}, {…}, {…}, {…}] "object"
- 0:
- ->2019-06-03: {toDo: "workout", selected: true}
- 1: {2019-06-04: {…}}
- 2: {2019-06-05: {…}}
- 3: {2019-06-06: {…}}
- 4: {2019-06-07: {…}}
- myObject[0].toDo = 'workout'
- var firstKey = Object.keys(myObject)[0];
- myObject[firstKey].todo = 'workout'
- (5) [{…}, {…}, {…}, {…}, {…}] "object"
- 0:
- ->2019-06-03: {toDo: "workout", selected: true}
- 1: {2019-06-04: {…}}
- 2: {2019-06-05: {…}}
- 3: {2019-06-06: {…}}
- 4: {2019-06-07: {…}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement