In Postgres DB one of the columns has this JSON data posted below.
When I do 'Select' query for that column - I want to replace JSON values of 'lib-One-5dc422e9f21531f9dbc16fd0' and 'lib-Six-5dc422e9f21531f9dbc16fd0' with just lib-One- and lib-Six- etc.
Am new to postgres and have been trying to figure this out for a while.
Basically replace any lib-*-[0-9]
values with just lib-*-
{
"data":{
"Library":{
"Checkout":{
"invoiceId":"12dfdf454546",
"checkoutDetail":{
"invoiceTransactionId":"5ab422e9f21531f9dbc16fd6",
"invoicePaymentDetail":{
"objectId":"lib-One-5dc422e9f21531f9dbc16fd0",
"checkoutPeriods":[
{
"startDate":"2017-04-14T19:00:00.000",
"endDate":"2017-05-19T19:00:00.000"
}
],
"invoice":{
"objectId":"lib-Six-5dc422e9f21531f9dbc16fd0",
"checkObject":true
}
}
}
}
}
}
}