I am new to Typescript. I want to select ids from observable I have an array as below. Please help me to get the expected output.
const Input=[{
"id": 1,
"text": "My Choice 1"
}, {
"id": 2,
"text": "My Choice 2"
}, {
"id": 3,
"text": "My Choice 3"
}, {
"id": 4,
"text": "My Choice 4"
}, {
"id": 5,
"text": "My Choice 5"
}];
Expected Result :
let selectedIds = [
{id: "Choice", name: "2"},
{id: "Choice", name: "3"},
{id: "Choice", name: "5"}];