Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Javascript : Unexpected token c in JSON at position 1 while converting to json

I am trying to convert a string to json in javascript but i am getting the below error. I know this is the standard format but somehow it does not seem to work. Can someone please let me know what i am doing wrong :-

Below json :

const txt = "{columns=[{visibleIndex=0, dataField=thumbnailUrl, name=thumbnailUrl, visible=true}, {visibleIndex=1, dataField=fileName, name=fileName, visible=true}, {visibleIndex=2, dataField=factorCategory, name=factorCategory, visible=true}, {visibleIndex=3, dataField=viewOnlyInd, name=viewOnlyInd, visible=true}, {visibleIndex=4, dataField=factorColonStatusCode, name=factorColonStatusCode, visible=true}, {visibleIndex=5, dataField=uploadedBy, name=uploadedBy, visible=true}, {visibleIndex=6, dataField=sourceCode, name=sourceCode, visible=true}, {visibleIndex=7, dataField=runnerFolderNames, name=runnerFolderNames, visible=true}, {visibleIndex=8, dataField=lastChgDate, name=lastChgDate, dataType=date, visible=true}, {visibleIndex=9, name=buttons, visible=true}], allowedPageSizes=[5, 10, 25, 50, 100, all], filterPanel={filterEnabled=true}, filterValue=null, searchText=, pageIndex=0, pageSize=0}"
const obj = JSON.parse(txt);

ERROR :

Unexpected token c in JSON at position 1
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!