Wie kann ich zwei Objekte (Punkte & Personen) in einem einzigen Objekt (verbunden) verbinden. Ich bin nett damit zu kämpfen, da ich Noobie mit JavaScript bin und ich Meteor + Mongo Combo benutze. SQL-Joins mit JavaScript simulieren
var scores = [
{person_id: "1", score_math: 9, score_biology: 9, score_chemistry: 9},
{person_id: "2", score_math: 9, score_biology: 8, score_chemistry: 9}
];
var persons = [
{person_id: "1", person_name: "Bob", home_country: "Wakerly", age: 12},
{person_id: "2", person_name: "Arnie", home_country: "Templeton", age: 15},
{person_id: "3", person_name: "Steve", home_country: "Elberon", age: 10}
];
var joined = [
{person_id: "1", person_name: "Bob", home_country: "Wakerly", score_math: 9, score_biology: 9, score_chemistry: 9},
{person_id: "2", person_name: "Arnie", home_country: "Templeton", score_math: 9, score_biology: 8, score_chemistry: 9},
{person_id: "3", person_name: "Steve", home_country: "Elberon", score_math: 0, score_biology: 0, score_chemistry: 0}];