Within a list of objects, I am specifically looking to extract the name "sample 4" from the second set of objects with an ID of 2. How can this value be retrieved using JavaScript or Angular?
{Id: 1, name: sample 1, code: "type", order: 1}
{Id: 1, name: sample 2, code: "type1", order: 2}
{Id: 1, name: sample 3, code: "type2", order: 3}
{Id: 2, name: sample 1, code: "type", order: 1}
{Id: 2, name: sample 2, code: "type1", order: 2}
{Id: 2, name: sample 3, code: "type2", order: 3}
{Id: 2, name: sample 4, code: "type3", order: 4}
{Id: 3, name: sample 1, code: "type", order: 1}
{Id: 3, name: sample 2, code: "type1", order: 2}
{Id: 3, name: sample 3, code: "type2", order: 3}
{Id: 4, name: sample 1, code: "type", order: 1}
{Id: 4, name: sample 2, code: "type1", order: 2}
{Id: 4, name: sample 3, code: "type2", order: 3}