Returning a value from a method using promises

This may help (I show the “casting” process towards the end).