DB::select() returns the result in a collection (Kirby\Toolkit\Collection Object) and therein every record as an object (Kirby\Toolkit\Obj Object) in the form:
Kirby\Toolkit\Obj Object
(
[project_id] => 100001383
[project_type] => project
[project_reference] =>
[project_v_acronym] => MyProject202401
[project_title] => My Project Title 2024.01
...
For a collection object there are some very handy methods to get more information about the collection object properties like $myCollectionObject-keys().
For the single record object these collection object methods do no exist.
What I want is to get from the record object the properties keys/names as an array: “project_id, project_type …”.
Is there a simple way to get those (all) object properties keys/keys in an array. The object method mySimpleObject->toArray() returns a complex array that can not be handled directly with the php function array_keys().
Many thanks in advance.