How can I query from a JSON-type Column in PostgreSQL? Let's say following is my Entity witch contains the JSON-type column validDates:
// My Menu - Entity Class
@Entity()
export Class Menu {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column('json', {nullable: true})
validDates?: ValidDatesClass;
}
// The ValidDatesClass
export class ValidDatesClass {
[key: string]: boolean;
}
And I want to retrieve (SQL syntax) all Menus where validDates 's value is true (example of a validDates- entry: "Mon Aug 01 2018": true )