you have
.FirstOrDefault();
at the end of your c# statement and it will give only single item or null value as result. if you need array or list, use
ToList
or
ToArray
methods
var obj= db.Database.SqlQuery<string>("EXEC GET_GROUP_PERMIT @GID", idParam).ToList();
return JsonConvert.SerializeObject(obj);