Below is my output
dataset:
{"_id":"","steps":[{"cacheHit":false,"completedAt":"2024-08-01T11:24:43.702Z","data":"{"selfiePhotoUrl":""}","id":"selfie","inner":{"isSelfieFraudError":false},"startCount":0,"startedAt":"2024-08-01T11:24:43.698Z","status":200}]}
{"_id":"","steps":[{"cacheHit":false,"completedAt":"2024-08-01T11:03:01.296Z","data":"{"country":"Botswana","countryCode":"BW","region":"Gaborone","regionCode":"GA","city":"Gaborone","zip":"","latitude":-24.6437,"longitude":25.9112,"safe":true,"ipRestrictionEnabled":false,"vpnDetectionEnabled":false,"platform":"web_mobile"}","id":"ip-validation","startCount":0,"startedAt":"2024-08-01T11:03:01.233Z","status":200},{"cacheHit":false,"completedAt":"2024-08-01T11:22:30.609Z","data":"{"videoUrl":"video/14bcc3c7-243f-4ecd-a5d2-edf7193c866e.mp4","spriteUrl":"s","selfieUrl":{"media":"66ab6ff561c966001eafb0b6","isUrl":true}}","id":"liveness","inner":{},"startCount":1,"startedAt":"2024-08-01T11:22:29.787Z","status":200}]}
{"_id":"","steps":[{"cacheHit":false,"completedAt":"2024-08-01T11:24:40.285Z","data":"{"country":"Mexico","countryCode":"MX","region":"Mexico City","regionCode":"CMX","city":"Mexico City","zip":"03020","latitude":19.4203,"longitude":-99.1193,"safe":true,"ipRestrictionEnabled":false,"vpnDetectionEnabled":false,"platform":"web_mobile"}","id":"ip-validation","startCount":0,"startedAt":"2024-08-01T11:24:40.251Z","status":200}]}
{"_id":"","steps":[{"cacheHit":false,"completedAt":"2024-07-31T20:57:55.762Z","data":"{"videoUrl":"https://something.com","spriteUrl":"sel","selfieUrl":{"media":"66aaa5529e9323001dd5436d","isUrl":true}}","id":"liveness","inner":{},"startCount":1,"startedAt":"2024-07-31T20:57:54.206Z","status":200}]}
{"_id":"","steps":[]}
{"_id":"","steps":[{"cacheHit":false,"completedAt":"2024-08-08T03:32:28.183Z","data":"{"videoUrl":"https://something.com","spriteUrl":"","selfieUrl":{"media":"66b43c4b338114001ebb6ec9","isUrl":true}}","id":"liveness","inner":{},"reused":false,"startCount":1,"startedAt":"2024-08-08T03:32:27.717Z","status":200},{"completedAt":"2024-08-08T03:32:35.869Z","connectedDocumentType":"national-id","data":"[{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":333,"name":"UK Most Wanted","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.457Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":469,"name":"EU Members of Parliament","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.457Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":472,"name":"FBI Most Wanted","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.458Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":467,"name":"CIA World Leaders","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.492Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":471,"name":"US Marshalls Service","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.528Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":437,"name":"US Bureau of Industry and Security","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.544Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":455,"name":"US Denied Persons","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.544Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":480,"name":"DEA Most Wanted","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.545Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":466,"name":"CoE Parliamentary Assembly","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.547Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":458,"name":"US OFAC","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.564Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":481,"name":"Personas de Interes","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.583Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":439,"name":"INTERPOL Red Notices","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.599Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":463,"name":"Swiss SECO Sanctions","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.628Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":470,"name":"UN Consolidated Sanctions","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.637Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":468,"name":"Banco Interamericano de Desarrollo","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.638Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":430,"name":"GB Consolidated List of Targets","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.651Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":328,"name":"UK Bank of England Sanctions list","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.665Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":417,"name":"AU Gov Dept of Foreign Trade and Affairs","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID ","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.671Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":843,"name":"EU financial sanctions","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID","dateOfBirth":"17-12-1963"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.679Z"},{"dataSource":"document-data","country":"PE","documentType":"national-id","watchlist":{"id":1026,"name":"SAT 69B","watchlistType":"basic"},"searchParams":{"documentNumber":"43265524","fullName":"DAVID","dateOfBirth":"17-12-2332"},"searchResult":null,"searchedAt":"2024-08-08T03:32:34.724Z"}]","dataSource":"document-data","id":"watchlists","reused":false,"startCount":1,"startedAt":"2024-08-08T03:32:31.13Z","status":200}]}
Now, when I display the data, it shows proper records without any backslashes. However, when I write this data as .json
files it adds slashes as can be seen in the data above.
For this, I used .option("escape","")
property but it didn’t work.
The schema of the steps
column is a string
and therefore it adds backslashes in the output but I want to remove this.
Any suggestions are appreciated