I have two arrays of objects like this:
let test = [
{Course: "", Week: "1", Hours: ""},
{Course: "", Week: "2", Hours: ""},
{Course: "", Week: "3", Hours: ""}
]
let values = [{Course: "A", Week: "3", Hours: "1"}]
I want to add the property from array "values" to array "test so the result will be:
let test = [
{Course: "", Week: "1", Hours: ""},
{Course: "", Week: "2", Hours: ""},
{Course: "", Week: "3", Hours: "1"}
]
Is this possible? The reason why I have it like this, is I need to specify all weeks at the start, and the values will be added from the user.