I am beginner so PLEASE..be gentle.
Here is the code:
for (i = 0; i<importedData.data.length; i++){
var b=importedData.data[i].maker;
console.log(b);
// console.log(importedData.data[i].maker);
var bt = importedData.data[i].body;
console.log(bt);
var ic = importedData.data[i].inkcolor;
console.log(ic);
var pt = importedData.data[i].type;
console.log(pt);
};
I get he results but as there are 25 different objects with same fields there are duplicates.
below is the JSON for your viewing
exports.data = [
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image01.jpg"
},
{
"type": "fountain",
"maker": "inkwell",
"inkcolor": "blue",
"body": "metal",
"length": "6 inches",
"img" : "image02.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image03.jpg"
},
{
"type": "ballpoint",
"maker": "inkwell",
"inkcolor": "blue",
"body": "ceramic",
"length": "5 inches",
"img" : "image04.jpg"
},
{
"type": "ballpoint",
"maker": "luxor",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image05.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image06.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image07.jpg"
},
{
"type": "ballpoint",
"maker": "montblanc",
"inkcolor" : "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image08.jpg"
},
{
"type": "ballpoint",
"maker": "luxor",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image09.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image10.jpg"
},
{
"type": "ballpoint",
"maker": "inkwell",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image11.jpg"
},
{
"type": "ballpoint",
"maker": "papermate",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image12.jpg"
},
{
"type": "ballpoint",
"maker": "montblanc",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image13.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image14.jpg"
},
{
"type": "fountain",
"maker": "montblanc",
"inkcolor": "black",
"body": "gold",
"length": "6 inches",
"img" : "image15.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "yellow",
"body": "plastic",
"length": "6 inches",
"img" : "image16.jpg"
},
{
"type": "ballpoint",
"maker": "sharpie",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image17.jpg"
},
{
"type": "fountain",
"maker": "papermate",
"inkcolor": "black",
"body": "plastic",
"length": "6 inches",
"img" : "image18.jpg"
},
{
"type": "felt",
"maker": "Bic",
"inkcolor": "blue",
"body": "plastic",
"length": "6 inches",
"img" : "image19.jpg"
},
{
"type": "ballpoint",
"maker": "technicalpen",
"inkcolor": "blue",
"body": "plastic",
"length": "4 inches",
"img" : "image20.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "red",
"body": "metal",
"length": "5 inches",
"img" : "image21.jpg"
},
{
"type": "ballpoint",
"maker": "technicalpen",
"inkcolor": "blue",
"body": "plastic",
"length": "5 inches",
"img" : "image22.jpg"
},
{
"type": "ballpoint",
"maker": "Bic",
"inkcolor": "green",
"body": "plastic",
"length": "6 inches",
"img" : "image23.jpg"
},
{
"type": "ballpoint",
"maker": "parker",
"inkcolor": "black",
"body": "plastic",
"length": "6 inches",
"img" : "image24.jpg"
},
{
"type": "ballpoint",
"maker": "uniball",
"inkcolor": "red",
"body": "plastic",
"length": "6 inches",
"img" : "image25.jpg"
},
];