purescript / purescript-transformers

Monad and comonad transformers
BSD 3-Clause "New" or "Revised" License
69 stars 44 forks source link

i can't get particular value from API object response #103

Closed Rakesh1988Rakesh closed 7 years ago

Rakesh1988Rakesh commented 7 years ago

I am fetching api responce as a:

result = studentInfo: StudentInfo { department : ["Account", "Register", "Sport", "Social", "Hostel"] ,branch : {id : "001",name : "IT", count: 50 , year :2017} }

and i will try to get only count value from branch and assing to simple number variable, but we can't get count value.

i am tring to get count value as a: result.branch{count} result.branch.count result{branch{count}} result{branch.count}

but its shows error "Could not match type"

how to get count value in purescript code. please help me to resolved that issue.