Unable to eliminate backslashes from the JSON output via Pyspark

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

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật