I have this array
var getDay: [
{ DayValue: '10D', DayDisplay: '10' },
{ DayValue: '20D', DayDisplay: '20' },
{ DayValue: '30D', DayDisplay: '30' }
]
Now there is another code as follows.
var b_day = getDayDetails('10D')
This will get 10D and check the corresponding DayDisplay value in getDay array.
I want the final value of b_day as '10'
Similarly, if var b_day = getDayDetails('20D')
, i want the final value of b_day as '20'
can someone please let me know how to achieve this?