Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.arr = userData; // -> json
- this.pId = this.arr.pId; // value is 1 or 2 or 3
- pVal: Array<Object> = [{id:1, group:'VKC'},
- {id:2, group:'ABC'},
- {id:10, group:'DEF'},
- {id:3, group:'GHI'},
- {id:5, group:'JKL'},]
- alert(this.pVal['1'].group);
- this.pInd = this.pVal[this.pId].group;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement