I’m trying to iterate json array (sampleData) with sample enum object (testSet) and achieve the desired result (OUTPUT) through Angular typeScript (Array of strings).
enter image description here
Note: I’m trying to map testSet object with sampleData errorCode and filterout the json with errorCode present in testSet and SORT the response in same testSet manner. But, couldn’t figure out an optimal solution. Can someone please help. Thanks in Advance.
Tried fitering, mapping, sorting but code assuming code will be complex to execute and time constraints. thinking of an optimal solution.
please find the codebase here : “https://jsfiddle.net/aj65dq9t/”
jacob james is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.