protected static function normalizeRelationshipData(array &$value, array $arrayData)
    {
        $relationships = [];
        foreach ($arrayData[JsonApiTransformer::RELATIONSHIPS_KEY] as $attribute => $attributeValue) {
            //if $value[data] is not found, get next level where [data] should exist.
            if (!array_key_exists(JsonApiTransformer::DATA_KEY, $attributeValue)) {
                array_shift($attributeValue);
            }


            if (count($attributeValue[JsonApiTransformer::DATA_KEY]) > 0) {
                $relationships[$attribute] = $attributeValue;
            }
        }

        return $relationships;
    }