Creating a object possible or not ?

wondering how i can turn these results into objects.

console log view

code view -

  for(var i = 0; i < response.notes.length; i++){

        var d = new Date(parseInt(response.notes[i]['date'])*1000);
        var day = d.getDate();
        var month = d.getMonth();
        var year = d.getFullYear();
    
        console.log(d);
        console.log("Day " + day);
        console.log("Month " + month); 
        console.log("Year " + year);
        console.log("");
     
        
        }//for

Open in new window


would it be possible to store these as objects ? every try has failed and not sure if i can or not,
Alex LordAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MishaProgrammerCommented:
What about using JSON?
var results =  [] ;

for(var i = 0; i < response.notes.length; i++){
{
// your code block
        var d = new Date(parseInt(response.notes[i]['date'])*1000);
///
 var obj = { 
        Text: d,
        day : d.getDate(),
        month : d.getMonth(),
        year : d.getFullYear()
    };
 results .push(obj);
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alex LordAuthor Commented:
Hey Misha

This worked thank you.
0
MishaProgrammerCommented:
Glad to help you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
objects

From novice to tech pro — start learning today.