View definition

(*Object).GetNumberArray

Defined in github.com/antonholmquist/jason/jason.go

Description

Gets the value at key path and attempts to typecast the value into an array of numbers. Returns error if the value is not a json array or if any of the contained objects are not numbers. Example:

friendAges, err := GetNumberArray("person", "friend_ages")
for i, friendAge := range friendAges {
	... // friendAge will be of type float64 here
}

GetNumberArray is referenced in 0 repositories