It would be nice to do something like this:
$results = 'mysqli_query() + fetch_assoc() while-loop';
$jsonapi = new jsonapi\collection($type='users');
$jsonapi->import_from_array($results);
And maybe a way to split keys as relationships. Like import_from_array($array, $split_relation_names) or $array = collection::split_relations($array, $relation_names).
It would be nice to do something like this:
And maybe a way to split keys as relationships. Like
import_from_array($array, $split_relation_names)or$array = collection::split_relations($array, $relation_names).