Say you have an object formatted something like the following in one script (javascript)-
var person = {
firstName:"John",
lastName:"Doe",
age:50,
eyeColor:"blue"
};
Is there an intuitive way to "send" this object to another (javascript) script? Basically, i'm trying to communicate data within 2 scripts on a webpage and attempting to avoid having one big script, which would eliminate this problem.
I've already messed around with simply creating a div with a bunch of inner div's which hold the information from the object (All it's holding is text/numbers) but I feel like there has to be a better way of doing this in either javascript or jQuery.