Based on a function like this. How can I make the names fred, mary, sarah dynamic and expand/bild it based on a incoming nameArray?
var myObj = {
fred: { v: 2, q: 4, t: 7},
mary: { v: 0, q: 10, t: 0},
sarah: { v: 0, q: 0, t: 0}
}
msg = myObj;
return msg;