public function createFlatArrayWithValuesAsAttributeName($attribute_name)
    {
        $a = [];
        foreach ($this->getCollection() as $key => $object) {
            $object_array = $object->toArray();
            if (isset($object_array[$attribute_name])) {
                $a[$key] = $object_array[$attribute_name];
            }
        }
        return $a;
    }
public function createFlatArrayWithValuesAsAttributeName($attribute_name)
    {
        $a = [];
        foreach ($this->getCollection() as $key => $object) {
            $object_array = $object->toArray();
            if (isset($object_array[$attribute_name])) {
                $a[$key] = $object_array[$attribute_name];
            }
        }
        return $a;
    }
public function createFlatArrayWithValuesAsAttributeName ( $ attribute_name ) { $ a = [ ] ; foreach ( $ this -> getCollection ( ) as $ key => $ object ) { $ object_array = $ object -> toArray ( ) ; if ( isset ( $ object_array [ $ attribute_name ] ) ) { $ a [ $ key ] = $ object_array [ $ attribute_name ] ; } } return $ a ; }
solutions for reducing Collection just to one attribute - flat array

@param $attribute_name
@return array
solutions for reducing Collection just to one attribute - flat array