Getting a Reply from a dialog

i feel really dumb for asking this…
but how do i get the answer from a dialog like

display dialog “Please enter a number between 1 and 15” default answer “”

into a variable so i can use it?
the reply from this line (as from script editor) is something like
{text returned:“8”, button returned:“OK”}

how do i get that 8 so i can use it?

set theAnswer to text returned of (display dialog "Please enter a number between 1 and 15" default answer "")

j

cheers :smiley: