0
Javascript
Please how can access an Object in JavaScript using filter and map and putting the objects in a table using DOM
3 Answers
+ 2
Please add more details about your idea in the Description. For example what object needs to be accessed, what is there to obtain by accessing the object etc.
Also why you need both filter and map? AFAIK filter and map works with collection or iterable, but you only write "object".
Lastly, what table did you mean when you wrote "put the objects in a table"
+ 2
Your attempt. If you like have learn map and filter then try it first.
I know. You can get map and filter in first time. you may have to go back and learn these again. But that is process of learning.
map and filter are basically short form of loops. Think map and filter as loop. You will get it. And try to understand the code. I have written below.
map and filters is very very useful tool.
let array =[0, 1, 2, 3, 4] ;
const arr1 = array.map(a => a) ;
let obj = [
{nmae:"rohan", id:1},
{name:"mohan", id:2}
];
const obj1 = obj.map(o => o.id);
console.log( obj1 );
+ 2
Study the code to understand how these array methods work..
https://code.sololearn.com/WVnXtMxOdp4d/?ref=app