We have an vehicle_info stored in JSONB format in vehicle table.
id | vehicle_info(JSONB)
----+------------------------------------------------------------------------------------
1 | {"milestone": {"Honda_car": {"status":"sold"}}
3 | {"milestone": {"Mitsubishi_car", {"status":"available"}}
2 | {"milestone": {"Honda_car", {"status":"available"}}
How do I extract the data which has suffix car.Below is the one that I could think of but ending up in an error.
select * from vehicle where milestone -> LIKE '%_car' ->>'status'