Convert NSString to NSDictionary - ios
I got below response in NSString and I want to convert it into NSMutableDictionary
{
"dictionary": [
{
"title": "أذكار الاستيقاظ من النوم",
"id": "1",
"prod_image": [
{
"title_des": "الحَمْدُ لله الذِي أحْيَانا بَعْدَ مَا أمَاتَنَا وإلَيْهِ النَشُور"
},
{
"title_des": "الحَمْدُ لله الذِي عَافَانِي في جَسَدِي ورَدَّ عَلَيَّ رُوحِي، وأَذِنَ لي بِذِكْرهِ"
},
{
"title_des": "قال رسول الله صلى الله عليه وسلم \"مَنْ تَعَارَ مِنَ اللَّيْل* فقال حين يستيقظ :\"لا إلَهَ إلاَّ الله وحْدَهُ لا شَرِيكَ لَهُ، لَهُ المُلْكُ ولَهُ الحَمْدُ وهُوَ على كلِّ شيءٍ قَدير،سُبْحانَ الله والحَمْدُ لله ولا إله إلا الله والله أكبر ولا حَولَ ولا قُوةَ إلا بالله العلي العظيم \" ثم دعا: \" اللَّهُمَّ اغْفِرْ لي، غُفِرَ له \"، قال الوليد: أو قال: \" دعا استُجيبَ لهُ، فإن قام فتوضأَ ثمصَلّى قُبِلَتْ صَلاتُهُ "
},
{
"title_des": "إِنَّ فِي خَلْقِ السَّمَاوَاتِ وَالأَرْضِ وَاخْتِلاَفِ اللَّيْلِ وَالنَّهَارِ لآيَاتٍ لِّأُوْلِي الألْبَابِ *الَّذِينَ يَذْكُرُونَ اللّهَ قِيَاماً وَقُعُوداً وَعَلَىَ جُنُوبِهِمْ وَيَتَفَكَّرُونَ فِي خَلْقِ السَّمَاوَاتِ وَالأَرْضِ رَبَّنَا مَا خَلَقْتَ هَذا بَاطِلاً سُبْحَانَكَ فَقِنَا عَذَابَ النَّارِ*رَبَّنَا إِنَّكَ مَن تُدْخِلِ النَّارَ فَقَدْ أَخْزَيْتَهُ وَمَا لِلظَّالِمِينَ مِنْ أَنصَارٍ *رَّبَّنَا إِنَّنَا سَمِعْنَا مُنَادِياً يُنَادِي لِلإِيمَانِ أَنْ آمِنُواْ بِرَبِّكُمْ فَآمَنَّا رَبَّنَا فَاغْفِرْ لَنَا ذُنُوبَنَا وَكَفِّرْ عَنَّا سَيِّئَاتِنَا وَتَوَفَّنَا مَعَ الأبْرَارِ * رَبَّنَا وَآتِنَا مَا وَعَدتَّنَا عَلَى رُسُلِكَ وَلاَ تُخْزِنَا يَوْمَ الْقِيَامَةِ إِنَّكَ لاَ تُخْلِفُ الْمِيعَادَ *فَاسْتَجَابَ لَهُمْ رَبُّهُمْ أَنِّي لاَ أُضِيعُ عَمَلَ عَامِلٍ مِّنكُم مِّن ذَكَرٍ أَوْ أُنثَى بَعْضُكُم مِّن بَعْضٍ فَالَّذِينَ هَاجَرُواْ وَأُخْرِجُواْ مِن دِيَارِهِمْ وَأُوذُواْ فِي سَبِيلِي وَقَاتَلُواْ وَقُتِلُواْ لأُكَفِّرَنَّ عَنْهُمْ سَيِّئَاتِهِمْ وَلأُدْخِلَنَّهُمْ جَنَّاتٍ تَجْرِي مِن تَحْتِهَا الأَنْهَارُ ثَوَاباً مِّن عِندِ اللّهِ وَاللّهُ عِندَهُ حُسْنُ الثَّوَابِ *لاَ يَغُرَّنَّكَ تَقَلُّبُ الَّذِينَ كَفَرُواْ فِي الْبِلاَدِ *مَتَاعٌ قَلِيلٌ ثُمَّ مَأْوَاهُمْ جَهَنَّمُ وَبِئْسَ الْمِهَادُ *لَكِنِ الَّذِينَ اتَّقَوْاْ رَبَّهُمْ لَهُمْ جَنَّاتٌ تَجْرِي مِن تَحْتِهَا الأَنْهَارُ خَالِدِينَ فِيهَا نُزُلاً مِّنْ عِندِ اللّهِ وَمَا عِندَ اللّهِ خَيْرٌ لِّلأَبْرَارِ * وَإِنَّ مِنْ أَهْلِ الْكِتَابِ لَمَن يُؤْمِنُ بِاللّهِ وَمَا أُنزِلَ إِلَيْكُمْ وَمَا أُنزِلَ إِلَيْهِمْ خَاشِعِينَ لِلّهِ لاَ يَشْتَرُونَ بِآيَاتِ اللّهِ ثَمَناً قَلِيلاً أُوْلَـئِكَ لَهُمْ أَجْرُهُمْ عِندَ رَبِّهِمْ إِنَّ اللّهَ سَرِيعُ الْحِسَابِ *يَا أَيُّهَا الَّذِينَ آمَنُواْ اصْبِرُواْ وَصَابِرُواْ وَرَابِطُواْ وَاتَّقُواْ اللّهَ لَعَلَّكُمْ تُفْلِحُونَ"
}
]
}
]
}
NSDictionary *myDictionary = [responseString JSONValue]; // use this code for convert Convert NSString to NSDictionary
After convert NSString to NSDictionary i got responce like this:
{
dictionary = (
{
id = 1;
"prod_image" = (
{
"title_des" = "\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0627\U0644\U0630\U0650\U064a \U0623\U062d\U0652\U064a\U064e\U0627\U0646\U0627 \U0628\U064e\U0639\U0652\U062f\U064e \U0645\U064e\U0627 \U0623\U0645\U064e\U0627\U062a\U064e\U0646\U064e\U0627 \U0648\U0625\U0644\U064e\U064a\U0652\U0647\U0650 \U0627\U0644\U0646\U064e\U0634\U064f\U0648\U0631";
},
{
"title_des" = "\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0627\U0644\U0630\U0650\U064a \U0639\U064e\U0627\U0641\U064e\U0627\U0646\U0650\U064a \U0641\U064a \U062c\U064e\U0633\U064e\U062f\U0650\U064a \U0648\U0631\U064e\U062f\U0651\U064e \U0639\U064e\U0644\U064e\U064a\U0651\U064e \U0631\U064f\U0648\U062d\U0650\U064a\U060c \U0648\U0623\U064e\U0630\U0650\U0646\U064e \U0644\U064a \U0628\U0650\U0630\U0650\U0643\U0652\U0631\U0647\U0650";
},
{
"title_des" = "\U0642\U0627\U0644 \U0631\U0633\U0648\U0644 \U0627\U0644\U0644\U0647 \U0635\U0644\U0649 \U0627\U0644\U0644\U0647 \U0639\U0644\U064a\U0647 \U0648\U0633\U0644\U0645 \"\U0645\U064e\U0646\U0652 \U062a\U064e\U0639\U064e\U0627\U0631\U064e \U0645\U0650\U0646\U064e \U0627\U0644\U0644\U0651\U064e\U064a\U0652\U0644* \U0641\U0642\U0627\U0644 \U062d\U064a\U0646 \U064a\U0633\U062a\U064a\U0642\U0638 :\"\U0644\U0627 \U0625\U0644\U064e\U0647\U064e \U0625\U0644\U0627\U0651\U064e \U0627\U0644\U0644\U0647 \U0648\U062d\U0652\U062f\U064e\U0647\U064f \U0644\U0627 \U0634\U064e\U0631\U0650\U064a\U0643\U064e \U0644\U064e\U0647\U064f\U060c \U0644\U064e\U0647\U064f \U0627\U0644\U0645\U064f\U0644\U0652\U0643\U064f \U0648\U0644\U064e\U0647\U064f \U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0648\U0647\U064f\U0648\U064e \U0639\U0644\U0649 \U0643\U0644\U0651\U0650 \U0634\U064a\U0621\U064d \U0642\U064e\U062f\U064a\U0631\U060c\U0633\U064f\U0628\U0652\U062d\U0627\U0646\U064e \U0627\U0644\U0644\U0647 \U0648\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0648\U0644\U0627 \U0625\U0644\U0647 \U0625\U0644\U0627 \U0627\U0644\U0644\U0647 \U0648\U0627\U0644\U0644\U0647 \U0623\U0643\U0628\U0631 \U0648\U0644\U0627 \U062d\U064e\U0648\U0644\U064e \U0648\U0644\U0627 \U0642\U064f\U0648\U0629\U064e \U0625\U0644\U0627 \U0628\U0627\U0644\U0644\U0647 \U0627\U0644\U0639\U0644\U064a \U0627\U0644\U0639\U0638\U064a\U0645 \" \U062b\U0645 \U062f\U0639\U0627: \" \U0627\U0644\U0644\U0651\U064e\U0647\U064f\U0645\U0651\U064e \U0627\U063a\U0652\U0641\U0650\U0631\U0652 \U0644\U064a\U060c \U063a\U064f\U0641\U0650\U0631\U064e \U0644\U0647 \"\U060c \U0642\U0627\U0644 \U0627\U0644\U0648\U0644\U064a\U062f: \U0623\U0648 \U0642\U0627\U0644: \" \U062f\U0639\U0627 \U0627\U0633\U062a\U064f\U062c\U064a\U0628\U064e \U0644\U0647\U064f\U060c \U0641\U0625\U0646 \U0642\U0627\U0645 \U0641\U062a\U0648\U0636\U0623\U064e \U062b\U0645\U0635\U064e\U0644\U0651\U0649 \U0642\U064f\U0628\U0650\U0644\U064e\U062a\U0652 \U0635\U064e\U0644\U0627\U062a\U064f\U0647\U064f ";
},
{
"title_des" = "\U0625\U0650\U0646\U0651\U064e \U0641\U0650\U064a \U062e\U064e\U0644\U0652\U0642\U0650 \U0627\U0644\U0633\U0651\U064e\U0645\U064e\U0627\U0648\U064e\U0627\U062a\U0650 \U0648\U064e\U0627\U0644\U0623\U064e\U0631\U0652\U0636\U0650 \U0648\U064e\U0627\U062e\U0652\U062a\U0650\U0644\U0627\U064e\U0641\U0650 \U0627\U0644\U0644\U0651\U064e\U064a\U0652\U0644\U0650 \U0648\U064e\U0627\U0644\U0646\U0651\U064e\U0647\U064e\U0627\U0631\U0650 \U0644\U0622\U064a\U064e\U0627\U062a\U064d \U0644\U0651\U0650\U0623\U064f\U0648\U0652\U0644\U0650\U064a \U0627\U0644\U0623\U0644\U0652\U0628\U064e\U0627\U0628\U0650 *\U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U064a\U064e\U0630\U0652\U0643\U064f\U0631\U064f\U0648\U0646\U064e \U0627\U0644\U0644\U0651\U0647\U064e \U0642\U0650\U064a\U064e\U0627\U0645\U0627\U064b \U0648\U064e\U0642\U064f\U0639\U064f\U0648\U062f\U0627\U064b \U0648\U064e\U0639\U064e\U0644\U064e\U0649\U064e \U062c\U064f\U0646\U064f\U0648\U0628\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U064a\U064e\U062a\U064e\U0641\U064e\U0643\U0651\U064e\U0631\U064f\U0648\U0646\U064e \U0641\U0650\U064a \U062e\U064e\U0644\U0652\U0642\U0650 \U0627\U0644\U0633\U0651\U064e\U0645\U064e\U0627\U0648\U064e\U0627\U062a\U0650 \U0648\U064e\U0627\U0644\U0623\U064e\U0631\U0652\U0636\U0650 \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0645\U064e\U0627 \U062e\U064e\U0644\U064e\U0642\U0652\U062a\U064e \U0647\U064e\U0630\U0627 \U0628\U064e\U0627\U0637\U0650\U0644\U0627\U064b \U0633\U064f\U0628\U0652\U062d\U064e\U0627\U0646\U064e\U0643\U064e \U0641\U064e\U0642\U0650\U0646\U064e\U0627 \U0639\U064e\U0630\U064e\U0627\U0628\U064e \U0627\U0644\U0646\U0651\U064e\U0627\U0631\U0650*\U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0625\U0650\U0646\U0651\U064e\U0643\U064e \U0645\U064e\U0646 \U062a\U064f\U062f\U0652\U062e\U0650\U0644\U0650 \U0627\U0644\U0646\U0651\U064e\U0627\U0631\U064e \U0641\U064e\U0642\U064e\U062f\U0652 \U0623\U064e\U062e\U0652\U0632\U064e\U064a\U0652\U062a\U064e\U0647\U064f \U0648\U064e\U0645\U064e\U0627 \U0644\U0650\U0644\U0638\U0651\U064e\U0627\U0644\U0650\U0645\U0650\U064a\U0646\U064e \U0645\U0650\U0646\U0652 \U0623\U064e\U0646\U0635\U064e\U0627\U0631\U064d *\U0631\U0651\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0625\U0650\U0646\U0651\U064e\U0646\U064e\U0627 \U0633\U064e\U0645\U0650\U0639\U0652\U0646\U064e\U0627 \U0645\U064f\U0646\U064e\U0627\U062f\U0650\U064a\U0627\U064b \U064a\U064f\U0646\U064e\U0627\U062f\U0650\U064a \U0644\U0650\U0644\U0625\U0650\U064a\U0645\U064e\U0627\U0646\U0650 \U0623\U064e\U0646\U0652 \U0622\U0645\U0650\U0646\U064f\U0648\U0627\U0652 \U0628\U0650\U0631\U064e\U0628\U0651\U0650\U0643\U064f\U0645\U0652 \U0641\U064e\U0622\U0645\U064e\U0646\U0651\U064e\U0627 \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0641\U064e\U0627\U063a\U0652\U0641\U0650\U0631\U0652 \U0644\U064e\U0646\U064e\U0627 \U0630\U064f\U0646\U064f\U0648\U0628\U064e\U0646\U064e\U0627 \U0648\U064e\U0643\U064e\U0641\U0651\U0650\U0631\U0652 \U0639\U064e\U0646\U0651\U064e\U0627 \U0633\U064e\U064a\U0651\U0650\U0626\U064e\U0627\U062a\U0650\U0646\U064e\U0627 \U0648\U064e\U062a\U064e\U0648\U064e\U0641\U0651\U064e\U0646\U064e\U0627 \U0645\U064e\U0639\U064e \U0627\U0644\U0623\U0628\U0652\U0631\U064e\U0627\U0631\U0650 * \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0648\U064e\U0622\U062a\U0650\U0646\U064e\U0627 \U0645\U064e\U0627 \U0648\U064e\U0639\U064e\U062f\U062a\U0651\U064e\U0646\U064e\U0627 \U0639\U064e\U0644\U064e\U0649 \U0631\U064f\U0633\U064f\U0644\U0650\U0643\U064e \U0648\U064e\U0644\U0627\U064e \U062a\U064f\U062e\U0652\U0632\U0650\U0646\U064e\U0627 \U064a\U064e\U0648\U0652\U0645\U064e \U0627\U0644\U0652\U0642\U0650\U064a\U064e\U0627\U0645\U064e\U0629\U0650 \U0625\U0650\U0646\U0651\U064e\U0643\U064e \U0644\U0627\U064e \U062a\U064f\U062e\U0652\U0644\U0650\U0641\U064f \U0627\U0644\U0652\U0645\U0650\U064a\U0639\U064e\U0627\U062f\U064e *\U0641\U064e\U0627\U0633\U0652\U062a\U064e\U062c\U064e\U0627\U0628\U064e \U0644\U064e\U0647\U064f\U0645\U0652 \U0631\U064e\U0628\U0651\U064f\U0647\U064f\U0645\U0652 \U0623\U064e\U0646\U0651\U0650\U064a \U0644\U0627\U064e \U0623\U064f\U0636\U0650\U064a\U0639\U064f \U0639\U064e\U0645\U064e\U0644\U064e \U0639\U064e\U0627\U0645\U0650\U0644\U064d \U0645\U0651\U0650\U0646\U0643\U064f\U0645 \U0645\U0651\U0650\U0646 \U0630\U064e\U0643\U064e\U0631\U064d \U0623\U064e\U0648\U0652 \U0623\U064f\U0646\U062b\U064e\U0649 \U0628\U064e\U0639\U0652\U0636\U064f\U0643\U064f\U0645 \U0645\U0651\U0650\U0646 \U0628\U064e\U0639\U0652\U0636\U064d \U0641\U064e\U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0647\U064e\U0627\U062c\U064e\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0623\U064f\U062e\U0652\U0631\U0650\U062c\U064f\U0648\U0627\U0652 \U0645\U0650\U0646 \U062f\U0650\U064a\U064e\U0627\U0631\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U0623\U064f\U0648\U0630\U064f\U0648\U0627\U0652 \U0641\U0650\U064a \U0633\U064e\U0628\U0650\U064a\U0644\U0650\U064a \U0648\U064e\U0642\U064e\U0627\U062a\U064e\U0644\U064f\U0648\U0627\U0652 \U0648\U064e\U0642\U064f\U062a\U0650\U0644\U064f\U0648\U0627\U0652 \U0644\U0623\U064f\U0643\U064e\U0641\U0651\U0650\U0631\U064e\U0646\U0651\U064e \U0639\U064e\U0646\U0652\U0647\U064f\U0645\U0652 \U0633\U064e\U064a\U0651\U0650\U0626\U064e\U0627\U062a\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U0644\U0623\U064f\U062f\U0652\U062e\U0650\U0644\U064e\U0646\U0651\U064e\U0647\U064f\U0645\U0652 \U062c\U064e\U0646\U0651\U064e\U0627\U062a\U064d \U062a\U064e\U062c\U0652\U0631\U0650\U064a \U0645\U0650\U0646 \U062a\U064e\U062d\U0652\U062a\U0650\U0647\U064e\U0627 \U0627\U0644\U0623\U064e\U0646\U0652\U0647\U064e\U0627\U0631\U064f \U062b\U064e\U0648\U064e\U0627\U0628\U0627\U064b \U0645\U0651\U0650\U0646 \U0639\U0650\U0646\U062f\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0627\U0644\U0644\U0651\U0647\U064f \U0639\U0650\U0646\U062f\U064e\U0647\U064f \U062d\U064f\U0633\U0652\U0646\U064f \U0627\U0644\U062b\U0651\U064e\U0648\U064e\U0627\U0628\U0650 *\U0644\U0627\U064e \U064a\U064e\U063a\U064f\U0631\U0651\U064e\U0646\U0651\U064e\U0643\U064e \U062a\U064e\U0642\U064e\U0644\U0651\U064f\U0628\U064f \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0643\U064e\U0641\U064e\U0631\U064f\U0648\U0627\U0652 \U0641\U0650\U064a \U0627\U0644\U0652\U0628\U0650\U0644\U0627\U064e\U062f\U0650 *\U0645\U064e\U062a\U064e\U0627\U0639\U064c \U0642\U064e\U0644\U0650\U064a\U0644\U064c \U062b\U064f\U0645\U0651\U064e \U0645\U064e\U0623\U0652\U0648\U064e\U0627\U0647\U064f\U0645\U0652 \U062c\U064e\U0647\U064e\U0646\U0651\U064e\U0645\U064f \U0648\U064e\U0628\U0650\U0626\U0652\U0633\U064e \U0627\U0644\U0652\U0645\U0650\U0647\U064e\U0627\U062f\U064f *\U0644\U064e\U0643\U0650\U0646\U0650 \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0627\U062a\U0651\U064e\U0642\U064e\U0648\U0652\U0627\U0652 \U0631\U064e\U0628\U0651\U064e\U0647\U064f\U0645\U0652 \U0644\U064e\U0647\U064f\U0645\U0652 \U062c\U064e\U0646\U0651\U064e\U0627\U062a\U064c \U062a\U064e\U062c\U0652\U0631\U0650\U064a \U0645\U0650\U0646 \U062a\U064e\U062d\U0652\U062a\U0650\U0647\U064e\U0627 \U0627\U0644\U0623\U064e\U0646\U0652\U0647\U064e\U0627\U0631\U064f \U062e\U064e\U0627\U0644\U0650\U062f\U0650\U064a\U0646\U064e \U0641\U0650\U064a\U0647\U064e\U0627 \U0646\U064f\U0632\U064f\U0644\U0627\U064b \U0645\U0651\U0650\U0646\U0652 \U0639\U0650\U0646\U062f\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0645\U064e\U0627 \U0639\U0650\U0646\U062f\U064e \U0627\U0644\U0644\U0651\U0647\U0650 \U062e\U064e\U064a\U0652\U0631\U064c \U0644\U0651\U0650\U0644\U0623\U064e\U0628\U0652\U0631\U064e\U0627\U0631\U0650 * \U0648\U064e\U0625\U0650\U0646\U0651\U064e \U0645\U0650\U0646\U0652 \U0623\U064e\U0647\U0652\U0644\U0650 \U0627\U0644\U0652\U0643\U0650\U062a\U064e\U0627\U0628\U0650 \U0644\U064e\U0645\U064e\U0646 \U064a\U064f\U0624\U0652\U0645\U0650\U0646\U064f \U0628\U0650\U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0645\U064e\U0627 \U0623\U064f\U0646\U0632\U0650\U0644\U064e \U0625\U0650\U0644\U064e\U064a\U0652\U0643\U064f\U0645\U0652 \U0648\U064e\U0645\U064e\U0627 \U0623\U064f\U0646\U0632\U0650\U0644\U064e \U0625\U0650\U0644\U064e\U064a\U0652\U0647\U0650\U0645\U0652 \U062e\U064e\U0627\U0634\U0650\U0639\U0650\U064a\U0646\U064e \U0644\U0650\U0644\U0651\U0647\U0650 \U0644\U0627\U064e \U064a\U064e\U0634\U0652\U062a\U064e\U0631\U064f\U0648\U0646\U064e \U0628\U0650\U0622\U064a\U064e\U0627\U062a\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U062b\U064e\U0645\U064e\U0646\U0627\U064b \U0642\U064e\U0644\U0650\U064a\U0644\U0627\U064b \U0623\U064f\U0648\U0652\U0644\U064e\U0640\U0626\U0650\U0643\U064e \U0644\U064e\U0647\U064f\U0645\U0652 \U0623\U064e\U062c\U0652\U0631\U064f\U0647\U064f\U0645\U0652 \U0639\U0650\U0646\U062f\U064e \U0631\U064e\U0628\U0651\U0650\U0647\U0650\U0645\U0652 \U0625\U0650\U0646\U0651\U064e \U0627\U0644\U0644\U0651\U0647\U064e \U0633\U064e\U0631\U0650\U064a\U0639\U064f \U0627\U0644\U0652\U062d\U0650\U0633\U064e\U0627\U0628\U0650 *\U064a\U064e\U0627 \U0623\U064e\U064a\U0651\U064f\U0647\U064e\U0627 \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0622\U0645\U064e\U0646\U064f\U0648\U0627\U0652 \U0627\U0635\U0652\U0628\U0650\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0635\U064e\U0627\U0628\U0650\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0631\U064e\U0627\U0628\U0650\U0637\U064f\U0648\U0627\U0652 \U0648\U064e\U0627\U062a\U0651\U064e\U0642\U064f\U0648\U0627\U0652 \U0627\U0644\U0644\U0651\U0647\U064e \U0644\U064e\U0639\U064e\U0644\U0651\U064e\U0643\U064f\U0645\U0652 \U062a\U064f\U0641\U0652\U0644\U0650\U062d\U064f\U0648\U0646\U064e";
}
);
title = "\U0623\U0630\U0643\U0627\U0631 \U0627\U0644\U0627\U0633\U062a\U064a\U0642\U0627\U0638 \U0645\U0646 \U0627\U0644\U0646\U0648\U0645";
}
]
}
]
}
I am trying to read direct data from file which is in the project.
NSDictionary *myDictionary = [responseString JSONValue]; It's giving you correct Dictionary and Arrays.
e.g
[[myDictionary objectAtIndex:0] valueForKey:#"prod_image"];
give you the "title_des". If you want to get the First "title_des" then You can do something Like..
[[[[myDictionary objectAtIndex:0] valueForKey:#"prod_image"]objectAtIndex:0] valueForKey:#"title_des"];
When you print the "title_des" it will give you right result. But When you NSLOg the result it will not give you Correct Arabic.
You have to use the NSUTF8StringEncoding.
Let me know If you know something.
This is a JSON string so you can load it inside a NSDictionary using:
NSData *data = [self.json dataUsingEncoding:<encoding for arabian character>];
NSDictionary *dicSignature = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
Don't know about the encoding to use here, but for example, latin character would use NSUTF8StringEncoding.
You are getting JSON string as response. To convert it into NSMutableDictionary, you have to use
NSJSONSerialization or any other way to convert it. Try this:-
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:yourResponse options: NSJSONReadingMutableContainers error:&error];
Related
How to properly build a Clio Power Query custom connector for Power BI?
I am building a custom Power Query connector for Clio. It is my first PQ custom connector so I need to know 2 things: How do I work in the token handling in the Token Handling section? Once I get that working, how do I make the Client ID and Secret a dynamic reference to a separate file? I don't like the idea of hardcoding that into something. Here is my code: section Clio; [DataSource.Kind="Clio", Publish="Clio.Publish"] shared Clio.Contents = (optional message as text) => let _message = if (message <> null) then message else "(no message)", a = "Hello from Clio: " & _message in a; OAuthBaseUrl = "https://app.clio.com/api/v4"; // Data Source Kind description Clio = [ Authentication = [ OAuth = [ StartLogin = StartLogin, FinishLogin = FinishLogin ] ], Label = Extension.LoadString("DataSourceLabel") ]; // Data Source UI publishing description Clio.Publish = [ Beta = true, Category = "Other", ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp") }, LearnMoreUrl = "https://powerbi.microsoft.com/", SourceImage = Clio.Icons, SourceTypeImage = Clio.Icons ]; StartLogin = (resourceUrl, state, display) => let AuthorizeUrl = OAuthBaseUrl & "/oauth/authorize?" & Uri.BuildQueryString([ response_type = "code", client_id = client_id_code, redirect_uri = "https://app.clio.com/oauth/approval", state = state ]) in [ LoginUri = "https://app.clio.com", CallbackUri = "https://app.clio.com/oauth/approval", WindowHeight = 1080, WindowWidth = 720 ]; FinishLogin = (context, callbackUri, state) => let Parts = Uri.Parts(callbackUri)[Query] in TokenMethod(Parts[code], "authorization_code", context); //Token Handling TokenMethod = (grant_type, optional verifier) => let query = [ client_id = client_id_code, client_secret = client_secret_code, grant_type = "refresh_token", refresh_token = I_don't_know_what_to_put_here ], ManualHandlingStatusCodes= {400,403}, Response = Web.Contents(OAuthBaseUrl & "/token", [ Content = Text.ToBinary(Uri.BuildQueryString(query)), Headers = [ #"Content-type" = "application/x-www-form-urlencoded", #"Accept" = "application/json" ], ManualStatusHandling = ManualHandlingStatusCodes ]), Parts = Json.Document(Response) in // check for error in response if (Parts[error]? <> null) then error Error.Record(Parts[error], Parts[message]?) else Parts; Refresh = (resourceUrl, refresh_token) => TokenMethod(refresh_token, "refresh_token"); Clio.Icons = [ Icon16 = { Extension.Contents("Clio16.png"), Extension.Contents("Clio20.png"), Extension.Contents("Clio24.png"), Extension.Contents("Clio32.png") }, Icon32 = { Extension.Contents("Clio32.png"), Extension.Contents("Clio40.png"), Extension.Contents("Clio48.png"), Extension.Contents("Clio64.png") } ];
Metric math alarms: How can I use a for_each expression to loop over metrics within a dynamic block?
I am trying to create dynamic metric math alarms, that are configurable with a JSON. I am struggling with looping over the metric alarm with a for_each expression as this is a loop within a loop. Here is an example of what I am trying to do: resource "aws_cloudwatch_metric_alarm" "Percentage_Alert" { for_each = var.percentage_error_details locals { alarm_details = each.value } alarm_name = "${terraform.workspace}-${each.key}" comparison_operator = local.alarm_details["Comparison_Operator"] evaluation_periods = "1" threshold = local.alarm_details["Threshold"] metric_query { id = "e1" expression = local.alarm_details["Expression"] label = local.alarm_details["Label"] return_data = "true" } dynamic "metric_query" { for metric in each.value["Metrics"]{ id = metric.key metric_name = metric.value period = local.alarm_details["Period"] stat = local.alarm_details["Statistic"] namespace = local.full_namespace unit = "Count" } } } And this is the sample JSON { "locals": { "Name": { "Name": "metric_math", "Metrics": { "m1": "Sucess", "m2": "Failure" }, "Expression": "100*(m2/(m1+m2))", "Threshold" : 1, "Period": 25, "Priority": "critical", "Statistic": "Sum", "Label": "label", "Comparison_Operator": "GreaterThanOrEqualToThreshold" } } } And this is the error message i'm getting: Error: Invalid block definition On ../modules/cloudwatch/metriclogfilter/main.tf line 89: Either a quoted string block label or an opening brace ("{") is expected here. Any help would be much appreciated.
how to set custom example in #ApiResponse in swagger [duplicate]
I am facing issue with example in response. #ApiResponse(code=200, message="fetch list of Service/Config Resources", response = testing.class, responseContainer = "List", examples=#Example( value = #ExampleProperty( mediaType = MediaType.APPLICATION_JSON_VALUE, value = "{testingId: 1234, testingName = Testing Name}" ) ) ) But getting response example as [ { "testingId": "string", "testingName": "string" } ]
Swift 3: How to get language code from a country code?
I want to get the main language of a country. For example: "US" -> "en" or "VN" -> "vi" In Swift 3, are there any ways to do this?
The system has a list of common locales that include both a language and region. You can use this to get common languages for a region. There is no concept of a main language in a Locale. func commonLanguages(for region:String) -> [String] { return Locale.availableIdentifiers .map { Locale(identifier:$0) } .filter { $0.regionCode == region } .map { $0.languageCode ?? "??" } }
You can use a predefined language code list to identify the language code let array: [String] = [ "af-ZA", "am-ET", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "arn-CL", "ar-OM", "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-YE", "as-IN", "az-Cyrl-AZ", "az-Latn-AZ", "ba-RU", "be-BY", "bg-BG", "bn-BD", "bn-IN", "bo-CN", "br-FR", "bs-Cyrl-BA", "bs-Latn-BA", "ca-ES", "co-FR", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "de-LI", "de-LU", "dsb-DE", "dv-MV", "el-GR", "en-029", "en-AU", "en-BZ", "en-CA", "en-GB", "en-IE", "en-IN", "en-JM", "en-MY", "en-NZ", "en-PH", "en-SG", "en-TT", "en-US", "en-ZA", "en-ZW", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fil-PH", "fo-FO", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "fr-LU", "fr-MC", "fy-NL", "ga-IE", "gd-GB", "gl-ES", "gsw-FR", "gu-IN", "ha-Latn-NG", "he-IL", "hi-IN", "hr-BA", "hr-HR", "hsb-DE", "hu-HU", "hy-AM", "id-ID", "ig-NG", "ii-CN", "is-IS", "it-CH", "it-IT", "iu-Cans-CA", "iu-Latn-CA", "ja-JP", "ka-GE", "kk-KZ", "kl-GL", "km-KH", "kn-IN", "kok-IN", "ko-KR", "ky-KG", "lb-LU", "lo-LA", "lt-LT", "lv-LV", "mi-NZ", "mk-MK", "ml-IN", "mn-MN", "mn-Mong-CN", "moh-CA", "mr-IN", "ms-BN", "ms-MY", "mt-MT", "nb-NO", "ne-NP", "nl-BE", "nl-NL", "nn-NO", "nso-ZA", "oc-FR", "or-IN", "pa-IN", "pl-PL", "prs-AF", "ps-AF", "pt-BR", "pt-PT", "qut-GT", "quz-BO", "quz-EC", "quz-PE", "rm-CH", "ro-RO", "ru-RU", "rw-RW", "sah-RU", "sa-IN", "se-FI", "se-NO", "se-SE", "si-LK", "sk-SK", "sl-SI", "sma-NO", "sma-SE", "smj-NO", "smj-SE", "smn-FI", "sms-FI", "sq-AL", "sr-Cyrl-BA", "sr-Cyrl-CS", "sr-Cyrl-ME", "sr-Cyrl-RS", "sr-Latn-BA", "sr-Latn-CS", "sr-Latn-ME", "sr-Latn-RS", "sv-FI", "sv-SE", "sw-KE", "syr-SY", "ta-IN", "te-IN", "tg-Cyrl-TJ", "th-TH", "tk-TM", "tn-ZA", "tr-TR", "tt-RU", "tzm-Latn-DZ", "ug-CN", "uk-UA", "ur-PK", "uz-Cyrl-UZ", "uz-Latn-UZ", "vi-VN", "wo-SN", "xh-ZA", "yo-NG", "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW", "zu-ZA" ]; var countryCode: String = "US"; for (index, languageCode) in array.enumerated() { let languageComponent: [String] = languageCode.components(separatedBy: "-"); let lastElement = languageComponent[languageComponent.count - 1]; if (lastElement == countryCode) { print(languageCode); break; } }
How to group non-empty lines with PEG.js
I'm trying to parse a categories file with PEG.js How can I group categories (set of non-empty lines followed by a blank line) stopwords:fr:aux,au,de,le,du,la,a,et,avec synonyms:en:flavoured, flavored synonyms:en:sorbets, sherbets en:Artisan products fr:Produits artisanaux < en:Artisan products fr:Gressins artisanaux en:Baby foods fr:Aliments pour bébé, aliment pour bébé, alimentation pour bébé, aliment bébé, alimentation bébé, aliments bébé < en:Baby foods fr:Céréales pour bébé, céréales bébé < en:Whisky fr:Whisky écossais es:Whiskies escoceses wikipediacategory:Q8718387 For now I can parse line by line with this code: start = stopwords* synonyms* category+ language_and_words = l:[^:]+ ":" w:[^\n]+ {return {language: l.join(''), words: w.join('')};} stopwords = "stopwords:" w:language_and_words "\n"+ {return {stopwords: w};} synonyms = "synonyms:" w:language_and_words "\n"+ {return {synonyms: w};} category_line = "< "? w:language_and_words "\n"+ {return w;} category = c:category_line+ {return c;} I got: { "language": "en", "words": "Artisan products" }, { "language": "fr", "words": "Produits artisanaux" } but I want (for each group): { { "language": "en", "words": "Artisan products" }, { "language": "fr", "words": "Produits artisanaux" } } I tried this too, but it doesn't group and I got \n at the beginning of some lines. category_line = "< "? w:language_and_words "\n" {return w;} category = c:category_line+ "\n" {return c;}
I found a partial solution: start = category+ word = c:[^,\n]+ {return c.join('');} words = w:word [,]? {return w.trim();} parent = p:"< "? {return (p !== null);} line = p:parent w:words+ "\n" {return {parent: p, words: w};} category = l:line+ "\n"? {return l;} I can parse this... < fr:a,b fr:aa,bb en:d,e,f fr:dd,ee, ffff and get grouped: [ [ {...}, {...} ], [ {...}, {...} ] ] But there is a problem with "lang:" at the beginning of each category, if I try to parse "lang:" my catégories are not grouped...
I find it's useful to break down iteratively the parse (problem decomposition, old-school à la Wirth). Here's a partial solution that I think gets you in the right direction (I didn't parse the Line elements of categories. start = stopwords synonyms category+ category "category" = category:(Line)+ categorySeparator { return category } stopwords "stopwords" = stopwordLine* stopwordLine "stopword line" = stopwordLine:StopWordMatch EndOfLine* { return stopwordLine } StopWordMatch = "stopwords:" match:Text { return match } synonyms "stopwords" = synonymLine* synonymLine "stopword line" = synonymLine:SynonymMatch EndOfLine* { return synonymLine } SynonymMatch = "synonyms:" match:Text { return match } Line "line" = line:Text [\n] { return line } Text "text" = [^\n]+ { return text() } EndOfLine "(end of line)" = '\n' EndOfFile = !. { return "EOF"; } categorySeparator "separator" = EndOfLine EndOfLine* / EndOfLine? EndOfFile My use of mixed case is arbitrary and not very stylish. There's also a way to save the solutions online: http://peg.arcanis.fr/2WQ7CZ/