How to convert this data query to json? [on hold]











up vote
-2
down vote

favorite












I have this data in a mysql



-----------------------------------------------------------------------------------------------------------------------------
|id | post_type | post_date | post_content |
-----------------------------------------------------------------------------------------------------------------------------
| 1 | event | 2018-09-01 | {"start_date":"2018-11-12","end_date":"2018-11-13","description":"diskripsi singkat agenda"} |
-----------------------------------------------------------------------------------------------------------------------------


Here is an example of data in the image





I want to take it like this (fullcalendar script json data)



[
{
id: '15',
title: 'Example Event 1',
start: '2018-11-12',
end: '2018-11-13',
},
{
id: '16',
title: 'Example Event 2',
start: '2018-11-19',
end: '2018-11-20',
}

]


I use Codeigniter Framework.
Thank for answer










share|improve this question









New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by ADyson, Vickel, gre_gor, sideshowbarker, Makyen 23 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
    – ADyson
    yesterday










  • @ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
    – RZQ-Dev
    5 hours ago












  • with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
    – ADyson
    5 hours ago












  • @ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
    – RZQ-Dev
    5 hours ago















up vote
-2
down vote

favorite












I have this data in a mysql



-----------------------------------------------------------------------------------------------------------------------------
|id | post_type | post_date | post_content |
-----------------------------------------------------------------------------------------------------------------------------
| 1 | event | 2018-09-01 | {"start_date":"2018-11-12","end_date":"2018-11-13","description":"diskripsi singkat agenda"} |
-----------------------------------------------------------------------------------------------------------------------------


Here is an example of data in the image





I want to take it like this (fullcalendar script json data)



[
{
id: '15',
title: 'Example Event 1',
start: '2018-11-12',
end: '2018-11-13',
},
{
id: '16',
title: 'Example Event 2',
start: '2018-11-19',
end: '2018-11-20',
}

]


I use Codeigniter Framework.
Thank for answer










share|improve this question









New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by ADyson, Vickel, gre_gor, sideshowbarker, Makyen 23 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
    – ADyson
    yesterday










  • @ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
    – RZQ-Dev
    5 hours ago












  • with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
    – ADyson
    5 hours ago












  • @ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
    – RZQ-Dev
    5 hours ago













up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











I have this data in a mysql



-----------------------------------------------------------------------------------------------------------------------------
|id | post_type | post_date | post_content |
-----------------------------------------------------------------------------------------------------------------------------
| 1 | event | 2018-09-01 | {"start_date":"2018-11-12","end_date":"2018-11-13","description":"diskripsi singkat agenda"} |
-----------------------------------------------------------------------------------------------------------------------------


Here is an example of data in the image





I want to take it like this (fullcalendar script json data)



[
{
id: '15',
title: 'Example Event 1',
start: '2018-11-12',
end: '2018-11-13',
},
{
id: '16',
title: 'Example Event 2',
start: '2018-11-19',
end: '2018-11-20',
}

]


I use Codeigniter Framework.
Thank for answer










share|improve this question









New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have this data in a mysql



-----------------------------------------------------------------------------------------------------------------------------
|id | post_type | post_date | post_content |
-----------------------------------------------------------------------------------------------------------------------------
| 1 | event | 2018-09-01 | {"start_date":"2018-11-12","end_date":"2018-11-13","description":"diskripsi singkat agenda"} |
-----------------------------------------------------------------------------------------------------------------------------


Here is an example of data in the image





I want to take it like this (fullcalendar script json data)



[
{
id: '15',
title: 'Example Event 1',
start: '2018-11-12',
end: '2018-11-13',
},
{
id: '16',
title: 'Example Event 2',
start: '2018-11-19',
end: '2018-11-20',
}

]


I use Codeigniter Framework.
Thank for answer







mysql json codeigniter codeigniter-3 fullcalendar-3






share|improve this question









New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









dferenc

4,377112030




4,377112030






New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









RZQ-Dev

1




1




New contributor




RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






RZQ-Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as too broad by ADyson, Vickel, gre_gor, sideshowbarker, Makyen 23 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as too broad by ADyson, Vickel, gre_gor, sideshowbarker, Makyen 23 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
    – ADyson
    yesterday










  • @ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
    – RZQ-Dev
    5 hours ago












  • with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
    – ADyson
    5 hours ago












  • @ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
    – RZQ-Dev
    5 hours ago














  • 1




    what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
    – ADyson
    yesterday










  • @ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
    – RZQ-Dev
    5 hours ago












  • with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
    – ADyson
    5 hours ago












  • @ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
    – RZQ-Dev
    5 hours ago








1




1




what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
– ADyson
yesterday




what have you researched or tried so far? Looks like some of your data is already JSON, but maybe some is not? I would guess you need to decode the JSON from the DB into an object, manipulate it into the structure you want, add it to an array and then encode that array as JSON for output. But that's just a guess. You gave no context about your CodeIgniter or fullCalendar setup, and no indication of which part of the process is causing you a difficulty.
– ADyson
yesterday












@ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
– RZQ-Dev
5 hours ago






@ADyson thank u for answer. I am sorry, my inggris is not good. Yes i need to decode the JSON and data not JSON from DB into an object, manipulate it into the my structure, and it to an array and the encode that array as JSON for output. Can you help me?, thank you
– RZQ-Dev
5 hours ago














with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
– ADyson
5 hours ago






with which bit of it, exactly? What part(s) are you stuck with? What have you researched or tried so far? Now we have broken the problem down into little steps, you should find that each one is not so hard to solve on its own. You're asking for too much for a simple answer on here (hence why the question is deemed "too broad")
– ADyson
5 hours ago














@ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
– RZQ-Dev
5 hours ago




@ADyson Okay, maybe next time I will share whatever I have tried and studied. Thank you for your help
– RZQ-Dev
5 hours ago

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

A Topological Invariant for $pi_3(U(n))$