View definition

(*Object).GetStringArray

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 string. Returns error if the value is not a json array or if any of the contained objects are not strings. Gets the value at key path and attempts to typecast the value into an array of objects. Returns error if the value is not a json array or if any of the contained objects are not objects. Example:

friendNames, err := GetStringArray("person", "friend_names")
for i, friendName := range friendNames {
	... // friendName will be of type string here
}

GetStringArray is referenced in 8 repositories

github.com/antonholmquist/jason github.com/anthonynguyen/mread github.com/instainer/instainer

...