Parse this Json array and extract the value of text - arrays

Here is the full json that I want to parse and extract the text that has the value: The product is in second line 3rd row.
Can someone help?
"activities": [
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:56.8251462Z",
"serviceUrl": "XXXXXXXXXXXXXXXXXXXXXXXXX",
"channelId": "directline",
"from": {
"id": "user1"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"text": "the milk"
},
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:57.6856172Z",
"localTimestamp": "2019-07-01T15:18:57.5099359+00:00",
"channelId": "directline",
"from": {
"id": "XXXXXX",
"name": "XXXXXX"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXX"
},
"text": "The product is in second line 3rd row",
"attachments": [],
"entities": [],
"replyToId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
],
"watermark": "1"
}

You have specified that this is a full json you have placed in the question, But it is not full json you are missing something.
"activities":
[ //json array start from here
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:56.8251462Z",
"serviceUrl": "XXXXXXXXXXXXXXXXXXXXXXXXX",
"channelId": "directline",
"from": {
"id": "user1"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"text": "the milk"
},
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:57.6856172Z",
"localTimestamp": "2019-07-01T15:18:57.5099359+00:00",
"channelId": "directline",
"from": {
"id": "XXXXXX",
"name": "XXXXXX"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXX"
},
"text": "The product is in second line 3rd row",
"attachments": [],
"entities": [],
"replyToId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
], //json array ends here
these are extra lines
***"watermark": "1"
}***
if you want to use this array you need to add a '{' in very top line before
"activities": [
I am placing here a valid json now you can check it on Json parser used to parse json in objects
*Valid Json Here : *
{
"activities": [
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:56.8251462Z",
"serviceUrl": "XXXXXXXXXXXXXXXXXXXXXXXXX",
"channelId": "directline",
"from": {
"id": "user1"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"text": "the milk"
},
{
"type": "message",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2019-07-01T15:18:57.6856172Z",
"localTimestamp": "2019-07-01T15:18:57.5099359+00:00",
"channelId": "directline",
"from": {
"id": "XXXXXX",
"name": "XXXXXX"
},
"conversation": {
"id": "XXXXXXXXXXXXXXXXXX"
},
"text": "The product is in second line 3rd row",
"attachments": [],
"entities": [],
"replyToId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
],
"watermark": "1"
}

Related

In Avro schema, how to wrap the array to an object and put it as a union instead of putting just array as union

I have the following data and I want to wrap the OPTIONAL array as an object and then put in as a union but since I am new to this, I am not sure how to do this.
This is how I have done so far so could someone help me correct the below structure in the expected output. Note that this dataRefs is an optional field and this entire structure may or may not be present.
{
"name": "dataRefs",
"default": null,
"type": ["null",
{
"type": "array",
"items": {
"name": "dataRef",
"type": "record",
"fields": [
{
"name": "dataId",
"type": "string",
"avro.java.string": "String"
},
{
"name": "email",
"type": ["null" ,"string"],
"avro.java.string": "String"
},
{
"name": "phone",
"type": ["null" ,"string"],
"avro.java.string": "String"
},
{
"name": "userName",
"type": ["null" ,"string"],
"avro.java.string": "String"
},
{
"name": "addressRef",
"default": null,
"type": ["null", {
"name": "addressRefRecord",
"type": "record",
"fields": [
{
"name": "addrRefId",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "addrType",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "addressLine1",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "addressLine2",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "city",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "province",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "country",
"type": ["null","string"],
"avro.java.string": "String"
},
{
"name": "postalCode",
"type": ["null","string"],
"avro.java.string": "String"
}
]
}
]
}
]
}
}
]
}
My JSON data that I intend to map to above schema looks like follows:
"dataRefs": [{
"addressRef": {
"addrRefId": "0",
"addrType": "ADDRESS",
"addressLine1": "DA 81",
"addressLine2": "",
"city": "Amsterdam",
"country": "Netherlands",
"postalCode": "xxxx LN",
"province": ""
},
"dataId": "0",
"email": "xyz#abc.com"
}],
This is how I was able to do so:
{
"name": "dataRefs",
"type": [
"null",
{
"type": "record",
"name": "dataRefsObject",
"fields": [
{
"name": "dataRefsArray",
"type": {
"type": "array",
"items": {
"name": "dataRef",
"type": "record",
"fields": [
{
"name": "dataId",
"type": ["null", "string"],
"avro.java.string": "String"
},
{
"name": "userName",
"type": [
"null",
"string"
],
"avro.java.string": "String"
},
....

Elastic - JSON Array nested in Array

I have to index a json to Elastic which look like the below format. My problem is that the key "variable" is array that contains json objects (I thought about "nested" datatype of Elastic) but some of those objects it's possible to contain nested json arrays inside them. (see variable CUSTOMERS).
POST /example_data/data {
"process_name": "TEST_PROCESS",
"process_version ": 0,
"process_id": "1111",
"activity_id": "111",
"name": "update_data",
"username": "testUser",
"datetime": "2018-01-01 10:00:00",
"variables": [{
"name": "ΒΑΝΚ",
"data_type": "STRING",
"value": "EUROBANK"
},{
"name": "CITY",
"data_type": "STRING",
"value": "LONDON"
}, {
"name": "CUSTOMERS",
"data_type": "ENTITY",
"value": [{
"variables": [{
"name": "CUSTOMER_NAME",
"data_type": "STRING",
"value": "JOHN"
}, {
"name": " CUSTOMER_CITY",
"data_type": "STRING",
"value": "LONDON"
}
]
}
]
}, {
"name": "CUSTOMERS",
"data_type": "ENTITY",
"value": [{
"variables": [{
"name": "CUSTOMER_NAME",
"data_type": "STRING",
"value": "ΑΘΗΝΑ"
}, {
"name": " CUSTOMER_CITY ",
"data_type": "STRING",
"value": "LIVERPOOL"
}, {
"name": " CUSTOMER_NUMBER",
"data_type": "STRING",
"value": "1234567890"
}
]
}
]
}
] }
When I'm trying to index it I get the following error
{ "error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Can't merge a non object mapping [variables.value] with an object mapping [variables.value]"
}
],
"type": "illegal_argument_exception",
"reason": "Can't merge a non object mapping [variables.value] with an object mapping [variables.value]" }, "status": 400 }
Mapping
{ "example_data": {
"mappings": {
"data": {
"properties": {
"activity_id": {
"type": "text"
},
"name": {
"type": "text"
},
"process_name": {
"type": "text"
},
"process_version": {
"type": "integer"
}
"process_id": {
"type": "text"
},
"datetime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"username": {
"type": "text",
"analyzer": "greek"
},
"variables": {
"type": "nested",
"properties": {
"data_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"value": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}}}
When I remove the variable CUSTOMERS that contains the array, then It works properly because there are only json objects.
Is there a way to handle that? Thanks in advance

Json schema for array of objects doesn't validate

I have this schema for a json response
{
"title": "Products",
"description": "schema for products",
"type": "array",
"properties": {
"id": {
"description": "id of a product",
"type": "integer"
},
"name": {
"description": "name of the product",
"type": "string"
},
"created_at": {
"description": "record created_at",
"type": "string",
"format": "date-time"
},
"updated_at": {
"description": "record updated_at",
"type": "string",
"format": "date-time"
}
},
"required": ["id", "name"]
}
and I want to match this schema with this json
[{
"id": 1,
"name": "Cricket Ball"
}, {
"id": 2,
"name": "Soccer Ball"
}, {
"id": 3,
"name": "football ball"
}, {
"id": 4,
"name": "Basketball ball"
}, {
"id": 5,
"name": "Table Tennis ball"
}, {
"id": 6,
"name": "Tennis ball"
}]
This schema matches the response but it also matches the schema in which the required field is this
"required": ["ids", "names"]
I think the schema is validated against the array and the objects in the array are not validated.
The way you have it set up now, your properties key refers to the array itself, not to each item, and is being ignored (because arrays don't have properties, they just have items). You need to use the items key to validate each item in the array, like so:
{
"title": "Products",
"description": "schema for products",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "id of a product",
"type": "integer"
},
"name": {
"description": "name of the product",
"type": "string"
},
"created_at": {
"description": "record created_at",
"type": "string",
"format": "date-time"
},
"updated_at": {
"description": "record updated_at",
"type": "string",
"format": "date-time"
}
},
"required": ["id", "name"]
}
}
try map
new_array = response.map{ |k| { 'id': k['properties']['id']['description'], 'name': k['properties']['name']['description'] } }

Multi-dimensional arrays in Mandrill with handlebars

I'm trying to loop through a multi-dimensional array to get properties of products that are part of line items. They look basically like this: (I did a json_encode so it would be easier to read)
[{
"rcpt": "email#email.com",
"vars": [{
"name": "SYSTEM",
"content": "Bikes"
}, {
"name": "CUSTOMERSERVICE",
"content": "(855-553-4889)"
}, {
"name": "IMAGE",
"content": "http:\/\/www.url.com\/assets\/images\/chicago\/email\/dear_member.jpg"
}, {
"name": "LINKCOLOR",
"content": "#3db7e4"
}, {
"name": "FACEBOOK",
"content": "Bikes"
}, {
"name": "TWITTER",
"content": "Bikes"
}, {
"name": "INSTAGRAM",
"content": "Bikes"
}, {
"name": "CLOSING",
"content": "Greetings"
}, {
"name": "item",
"content": [{
"lineItem": 1,
"id": "3",
"name": "24-Hour Pass Gift Certificate",
"quantity": 2,
"nameShort": "24-Hour",
"type": "Gift Certificate",
"image": "24hour_blank.jpg",
"price": "9.95",
"total": "19.90",
"taxable": false,
"giftCertificates": {
"3204": {
"id": "3204",
"redemptionNumber": "xxxxx",
"type": "24-Hour"
},
"3205": {
"id": "3205",
"redemptionNumber": "xxxxx",
"type": "24-Hour"
}
}
}, {
"lineItem": 2,
"id": "1",
"name": "Annual Membership Gift Certificate",
"quantity": 2,
"nameShort": "Annual",
"type": "Gift Certificate",
"image": "annual_blank.jpg",
"price": "75.00",
"total": "150.00",
"taxable": false,
"giftCertificates": {
"892": {
"id": "892",
"redemptionNumber": "xxxxxx",
"type": "Annual"
},
"893": {
"id": "893",
"redemptionNumber": "xxxxx",
"type": "Annual"
}
}
}]
}, {
"name": "orderID",
"content": 1220
}, {
"name": "giftMessage",
"content": false
}, {
"name": "email",
"content": "email#email.com"
}, {
"name": "transactionDate",
"content": "12\/23\/2015"
}, {
"name": "transactionTime",
"content": "12:21 pm"
}, {
"name": "salesTaxTotal",
"content": 0
}, {
"name": "salesTaxRatePercent",
"content": "6.250"
}, {
"name": "TransactionAmount",
"content": "169.90"
}, {
"name": "account_number",
"content": "XXXX1111"
}, {
"name": "card_type",
"content": "Visa"
}, {
"name": "firstName",
"content": "tetete"
}, {
"name": "lastName",
"content": "tethuhhu"
}, {
"name": "address",
"content": "295 Place St"
}, {
"name": "city",
"content": "Brooklyn"
}, {
"name": "state",
"content": "NY"
}, {
"name": "zip",
"content": "11238"
}, {
"name": "country",
"content": "US"
}, {
"name": "phone",
"content": "8888888888"
}, {
"name": "transactionId",
"content": "xxxxxx"
}, {
"name": "shipToFirstName",
"content": "tetete"
}, {
"name": "shipToLastName",
"content": "tethuhhu"
}, {
"name": "shipToAaddress",
"content": "295 Place St"
}, {
"name": "shipToCity",
"content": "Brooklyn"
}, {
"name": "shipToState",
"content": "NY"
}, {
"name": "shipToZipCode",
"content": "11238"
}, {
"name": "ShipToCountry",
"content": "US"
}, {
"name": "ShipToCountry",
"content": "US"
}]
}]
So I am trying to get a print out of each gift certificate's type and redemption number. When I iterate through {{ giftCertificates }} like this:
{{#each giftCertificates}}
{{type}} {{redemptionNumber}}
{{/each}}
I get one of the line items but not the other. I'm guessing maybe it is being overwritten when it loops through again? But I have also tried to loop through {{ item }} and grab {{ giftCertificates.type }} and {{ giftCertificates.redemptionNumber }} and that does not work either. What is the correct way to get all of these from each line item?
Thanks for your help.
I know this is a very old question, but:
you can use {{this.proprietyName}} to get the type and number:
{{#each giftCertificates}}
{{this.892.type}}
{{/each}}
do not forget to add this to the mandrill message o
"merge": true,
"merge_language": "handlebars",
Also, the data structure is not ideal:
giftCertificates[
{
"id": "892",
"redemptionNumber": "xxxxxx",
"type": "Annual"
},
{
"id": "893",
"redemptionNumber": "xxxxxx",
"type": "Annual"
}
]
would be easier to handle.

what is wrong with this json array code facebook form

The error i am getting is this : Can't parse fields attribute. Is it a JSON array or CSV list?
The problem is in the select menu which is being included in the form. what i want to achieve is a select box as shown here on this link : Registration plugin
But somehow the problem is that the select box is not being displayed!
<iframe src='http://www.facebook.com/plugins/registration.php?
client_id=325340244194060&
redirect_uri=http://www.pingcampus.com/facebook_registration_plugin/store_user_data.php&
fields=[
{"name":"name"},
{"name":"email"},
{"name":"gender"},
{"name":"birthday"},
{'name':'captain', 'description':'Best Captain', 'type':'select', 'options':{'P':'Jean-Luc Picard','K':'James T. Kirk'}}
{'name':'captain', 'description':'College','type':'select','options':
{'P':'Jean-Luc Picard','K':'James T. Kirk',
'1':'Acropolis','2':'Astral','3':'Aurobindo','4':'BM','5':'Central','6':'Chameli','7':'IET (DAVV)','8':'IIST
','9':'IIST2
','10':'IPS
','11':'JDCT
','12':'KCB
','13':'LKCT
','14':'LNCT
','15':'MIT (Malwa)
','16':'Malwa (Malwa2)
','17':'Mandsaur
','18':'Mathuradevi
','19':'MITM (Medi1)
','20':'MIST (Medi2)
','21':'MGIEM
','22':'Nalin
','23':'Oriental
','24':'Patel
','25':'Prestige
','26':'Priyatam
','27':'Rishiraj
','28':'RKDF
','29':'Royal
','30':'Sanghvi
','31':'Sdbansal
','32':'SGSITS
','33':'SIMS
','34':'SKSITS
','35':'Star
','36':'SVCE
','37':'SVITS
','38':'Transnational
','39':'Truba
','40':'Venkateshwar
','41':'Vidhyasagar
','42':'Vikrant
','43':'Vindhya
','#':'--------------------------------
','#':'Commerce
','#':'--------------------------------
','44':'Acro
','45':'Apex
','46':'Arihant
','47':'BM
','48':'Chamelidevi
','49':'Chimc
','50':'Choithram
','51':'Christian
','52':'DCBS (Daly College)
','53':'IBMR
','54':'IIMR (IIST)
','55':'IIPS (DAVV)
','56':'Ilva
','57':'IMIR
','58':'Imperial
','59':'IMS (DAVV)
','60':'Islamia
','61':'JDCT
','62':'LKCT
','63':'LNCT
','64':'Maharaja
','65':'MIT (Malwa)
','66':'Mathuradevi
','67':'Matushri
','68':'MBKhalsa
','69':'Medicaps
','70':'Patel
','71':'Pioneer
','72':'Prestige
','73':'Priyatam
','74':'Renaissance
','75':'Rishiraj
','76':'Sahib
','77':'SAIMS
','78':'Sanghvi Innovative
','79':'Sapient
','80':'SGSITS
','81':'SIMS
','82':'SJDM
','83':'SKSITS
','84':'Softvision
','85':'SVCE
','86':'Rransnational
','87':'Vaishnav
','88':'Venkteshwar
','89':'Vidhyasagar
','90':'Vikrant
','#':'--------------------------------
','#':'Pharmacy
','#':'--------------------------------
','91':'Acropolis
','92':'Aurobindo
','93':'BM
','94':'Central
','95':'SOPE (DAVV)
','96':'IIP(IIST)
','97':'IPS
','98':'Oriental
','99':'Rishiraj
','100':'RKDF
','101':'Safe
','102':'SGSITS
','103':'Smriti (SCOPE)
','104':'svce
','105':'vikrant
','#':'--------------------------------
','#':'Medical
','#':'--------------------------------
','106':'Arihant
','107':'Bombay Hospital
','108':'Index
','109':'MGMMC
','110':'RD Memorial
','111':'Shubhdeep
','#':'--------------------------------
','#':'Dental
','#':'--------------------------------
','112':'Aurobindo
','113':'CDSH
','114':'GCD
','115':'Index
','116':'Modern
','#':'--------------------------------
','#':'Arts
','#':'--------------------------------
','117':'BIG Aims
','118':'Frameboxx
','119':'INIFD
','120':'MAAC
','121':'SDPS
','122':'SJMC (DAVV)
','123':'Virtual Voyage
','124':'Zica
','132':'EMRC (DAVV)
','#':'--------------------------------
','#':'Architecture
','#':'--------------------------------
','125':'IPS
','126':'SDPS
','#':'--------------------------------
','#':'Law
','#':'--------------------------------
','127':'Christian
','128':'SOL(DAVV)
','129':'IIL
','130':'Vaishnav'} },
{"name":"Arts","description":"Arts","type":"checkbox","value":"Arts"},
{"name":"Act","description":"Act","type":"checkbox","value":"Act"},
{"name":"Cooking","description":"Cooking","type":"checkbox","value":"Cooking"},
{"name":"Dance","description":"Dance","type":"checkbox","value":"Dance"},
{"name":"Designing","description":"Designing","type":"checkbox","value":"Designing"},
{"name":"Fashion","description":"Fashion Designing","type":"checkbox","value":"Fashion Designing"},
{"name":"Interior","description":"Interior Designing","type":"checkbox","value":"Interior Designing"},
{"name":"Modeling","description":"Modeling","type":"checkbox","value":"Modeling"},
{"name":"Photography","description":"Photography","type":"checkbox","value":"Photography"},
{"name":"Poetry","description":"Poetry / Writing","type":"checkbox","value":"Poetry / Writing"},
{"name":"Programming","description":"Programming","type":"checkbox","value":"Programming"},
{"name":"Reading","description":"Reading","type":"checkbox","value":"Reading"},
{"name":"Sketching","description":"Sketching / Drawing","type":"checkbox","value":"Sketching / Drawing"},
{"name":"Singing","description":"Singing","type":"checkbox","value":"Singing"},
{"name":"Sports","description":"Sports","type":"checkbox","value":"Sports"},
{"name":"Stunting","description":"Stunting","type":"checkbox","value":"Stunting"},
{"name":"Videography","description":"Checkthis","type":"checkbox","value":"Videography"},
{"name":"Other","description":"Other","type":"checkbox","value":"Other"},
{"name":"captcha"}
]'
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="500"
height="800"
>
</iframe>
Try to replace fields=[....] with valid JSON
[
{
"name": "name"
},
{
"name": "email"
},
{
"name": "gender"
},
{
"name": "birthday"
},
{
"name": "captain",
"description": "BestCaptain",
"type": "select",
"options": {
"P": "Jean-LucPicard",
"K": "JamesT.Kirk"
}
},
{
"name": "captain",
"description": "College",
"type": "select",
"options": {
"1": "Acropolis",
"2": "Astral",
"3": "Aurobindo",
"4": "BM",
"5": "Central",
"6": "Chameli",
"7": "IET(DAVV)",
"8": "IIST",
"9": "IIST2",
"10": "IPS",
"11": "JDCT",
"12": "KCB",
"13": "LKCT",
"14": "LNCT",
"15": "MIT(Malwa)",
"16": "Malwa(Malwa2)",
"17": "Mandsaur",
"18": "Mathuradevi",
"19": "MITM(Medi1)",
"20": "MIST(Medi2)",
"21": "MGIEM",
"22": "Nalin",
"23": "Oriental",
"24": "Patel",
"25": "Prestige",
"26": "Priyatam",
"27": "Rishiraj",
"28": "RKDF",
"29": "Royal",
"30": "Sanghvi",
"31": "Sdbansal",
"32": "SGSITS",
"33": "SIMS",
"34": "SKSITS",
"35": "Star",
"36": "SVCE",
"37": "SVITS",
"38": "Transnational",
"39": "Truba",
"40": "Venkateshwar",
"41": "Vidhyasagar",
"42": "Vikrant",
"43": "Vindhya",
"44": "Acro",
"45": "Apex",
"46": "Arihant",
"47": "BM",
"48": "Chamelidevi",
"49": "Chimc",
"50": "Choithram",
"51": "Christian",
"52": "DCBS(DalyCollege)",
"53": "IBMR",
"54": "IIMR(IIST)",
"55": "IIPS(DAVV)",
"56": "Ilva",
"57": "IMIR",
"58": "Imperial",
"59": "IMS(DAVV)",
"60": "Islamia",
"61": "JDCT",
"62": "LKCT",
"63": "LNCT",
"64": "Maharaja",
"65": "MIT(Malwa)",
"66": "Mathuradevi",
"67": "Matushri",
"68": "MBKhalsa",
"69": "Medicaps",
"70": "Patel",
"71": "Pioneer",
"72": "Prestige",
"73": "Priyatam",
"74": "Renaissance",
"75": "Rishiraj",
"76": "Sahib",
"77": "SAIMS",
"78": "SanghviInnovative",
"79": "Sapient",
"80": "SGSITS",
"81": "SIMS",
"82": "SJDM",
"83": "SKSITS",
"84": "Softvision",
"85": "SVCE",
"86": "Rransnational",
"87": "Vaishnav",
"88": "Venkteshwar",
"89": "Vidhyasagar",
"90": "Vikrant",
"91": "Acropolis",
"92": "Aurobindo",
"93": "BM",
"94": "Central",
"95": "SOPE(DAVV)",
"96": "IIP(IIST)",
"97": "IPS",
"98": "Oriental",
"99": "Rishiraj",
"100": "RKDF",
"101": "Safe",
"102": "SGSITS",
"103": "Smriti(SCOPE)",
"104": "svce",
"105": "vikrant",
"106": "Arihant",
"107": "BombayHospital",
"108": "Index",
"109": "MGMMC",
"110": "RDMemorial",
"111": "Shubhdeep",
"112": "Aurobindo",
"113": "CDSH",
"114": "GCD",
"115": "Index",
"116": "Modern",
"117": "BIGAims",
"118": "Frameboxx",
"119": "INIFD",
"120": "MAAC",
"121": "SDPS",
"122": "SJMC(DAVV)",
"123": "VirtualVoyage",
"124": "Zica",
"125": "IPS",
"126": "SDPS",
"127": "Christian",
"128": "SOL(DAVV)",
"129": "IIL",
"130": "Vaishnav",
"132": "EMRC(DAVV)",
"P": "Jean-LucPicard",
"K": "JamesT.Kirk",
"#": "--------------------------------"
}
},
{
"name": "Arts",
"description": "Arts",
"type": "checkbox",
"value": "Arts"
},
{
"name": "Act",
"description": "Act",
"type": "checkbox",
"value": "Act"
},
{
"name": "Cooking",
"description": "Cooking",
"type": "checkbox",
"value": "Cooking"
},
{
"name": "Dance",
"description": "Dance",
"type": "checkbox",
"value": "Dance"
},
{
"name": "Designing",
"description": "Designing",
"type": "checkbox",
"value": "Designing"
},
{
"name": "Fashion",
"description": "Fashion Designing",
"type": "checkbox",
"value": "Fashion Designing"
},
{
"name": "Interior",
"description": "Interior Designing",
"type": "checkbox",
"value": "Interior Designing"
},
{
"name": "Modeling",
"description": "Modeling",
"type": "checkbox",
"value": "Modeling"
},
{
"name": "Photography",
"description": "Photography",
"type": "checkbox",
"value": "Photography"
},
{
"name": "Poetry",
"description": "Poetry / Writing",
"type": "checkbox",
"value": "Poetry / Writing"
},
{
"name": "Programming",
"description": "Programming",
"type": "checkbox",
"value": "Programming"
},
{
"name": "Reading",
"description": "Reading",
"type": "checkbox",
"value": "Reading"
},
{
"name": "Sketching",
"description": "Sketching / Drawing",
"type": "checkbox",
"value": "Sketching / Drawing"
},
{
"name": "Singing",
"description": "Singing",
"type": "checkbox",
"value": "Singing"
},
{
"name": "Sports",
"description": "Sports",
"type": "checkbox",
"value": "Sports"
},
{
"name": "Stunting",
"description": "Stunting",
"type": "checkbox",
"value": "Stunting"
},
{
"name": "Videography",
"description": "Checkthis",
"type": "checkbox",
"value": "Videography"
},
{
"name": "Other",
"description": "Other",
"type": "checkbox",
"value": "Other"
},
{
"name": "captcha"
}
]
Your fields parameter for Registration social plugin contain not valid JSON object (JSON should use double quotes instead of single quotes) and you're missing , (comma) in the middle of array, after next line:
{'name':'captain', 'description':'Best Captain', 'type':'select', 'options':{'P':'Jean-Luc Picard','K':'James T. Kirk'}}
Update:
Actually even usage of just valid JSON may not work in that case due to fact that this is passed as query string arguments, so that JSON should be properly encoded to avoid problems. Also may cause some issues.
Also you have two fields named "captain" (which cause problem with registration plugin too).
Here I've created some samples (due to massive code of fields, I'm not putting them here):
Creating fields from JavaScript object and passing em to Registration plugin: http://jsfiddle.net/QwdCv/
Correctly encoded fields in URL passed directly within iframe tag src attribute: http://jsfiddle.net/QwdCv/1/

Resources