You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ abn }=require('/usr/local/lib/node_modules/@phuocng/fake-numbers');constfaker=require('/usr/local/lib/node_modules/pg-anonymizer/node_modules/faker');constomitJsonField=(field,val,newFieldValue='Omitted')=>{constparsed=JSON.parse(val);if(!parsed){returnval;}// TODO: You can recursively search for the field as wellconstnewVal={
...parsed,[field]: newFieldValue}returnJSON.stringify(newVal);}module.exports={omitReference: (val)=>{returnomitJsonField("Reference",val);}};
Is it possible to anonymize values in JSONs (simple) structure?
Let's say I have JSONB column:
and I want to anonymize
data->>'first_name'
. Would that work too?The text was updated successfully, but these errors were encountered: