add json_encode usage for js array generating in select2 widget