Filter post content in REST API

It looks to me like you’ve written $data->$data[...] where you mean to have $data->data[...]. The “object to string” conversion error is probably due to the second $data, where PHP expects an object’s property name but is getting another reference to the $data object.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)