Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何从react native中的json数据中删除html标记?_Javascript_Html_Json_React Native - Fatal编程技术网

Javascript 如何从react native中的json数据中删除html标记?

Javascript 如何从react native中的json数据中删除html标记?,javascript,html,json,react-native,Javascript,Html,Json,React Native,在我的React原生应用程序中,我正在获取包含原始html标记的json数据。如何从中删除html标记?下面是我得到的json响应 [{ "data": { "course": { "id": 2864, "name": "2. Understanding India’s economic transition", "date_created": 1506154480, "st

在我的React原生应用程序中,我正在获取包含原始html标记的json数据。如何从中删除html标记?下面是我得到的json响应

[{
    "data": {
        "course": {
            "id": 2864,
            "name": "2. Understanding India’s economic transition",
            "date_created": 1506154480,
            "status": "publish",
            "price": false,
            "price_html": "FREE",
            "total_students": 0,
            "seats": "",
            "start_date": false,
            "average_rating": 0,
            "rating_count": 0,
            "featured_image": "https://www.mywebsite.com/lms/wp-content/themes/wplms/assets/images/avatar.jpg",
            "categories": [],
            "instructor": {
                "id": "22",
                "name": "aami",
                "avatar": "https://www.mywebsite.com/lms/wp-content/uploads/2017/11/favicon.png",
                "sub": ""
            },
            "menu_order": 0
        },
        "description": "<p style=\"text-align: justify;\">India is undergoing an economic, social and technological transformation. Perhaps no other phase is going to be as critical as the present one in shaping the future of the country as well as determining the welfare of the people. The economic transition is the vital ingredient of these overall change. Faster growth accompanied by industrial sector expansion, skill addition to the people, creation of quality infrastructure etc. will fuel this growth phase.</p>\n<p style=\"text-align: justify;\">For understanding how important is the present development phase, we have to adopt a historical and comparative study. Following factors helps us to understand the present development phase of India.</p>\n\n<ol style=\"text-align: justify;\">\n \t<li><strong>Achievement of higher growth rate as a middle-income economy. </strong></li>\n</ol>\n<p style=\"text-align: justify;\">India at present is a lower middle-income economy and has to become a high-income economy undergoing a rapid growth phase extending at least three decades.</p>\n<p style=\"text-align: justify;\">Most important narrative about the Indian economy is that it is the third largest in the world in terms of Purchasing Power Parity GDP. But a superior way to asses a country’s development is to consider per capita income. The widely used ranking about countries’ economic position is that of the World Bank’s GDP Per capita (constant US $) and the data for 2016 shows that India’s per capita income is $1861 compared to China’s $ 6994.</p>\n<p style=\"text-align: justify;\">Table: Categorization of countries by World Bank</p>\n\n<table>\n<tbody>\n<tr>\n<td width=\"198\"><strong>Category</strong></td>\n<td width=\"318\"><strong>PCI as on 2015 in constant US Dollar</strong></td>\n</tr>\n<tr>\n<td width=\"198\">Low Income Economy</td>\n<td width=\"318\">$ 1025 or less</td>\n</tr>\n<tr>\n<td width=\"198\">Middle Income Economy\n\n(India - $ 1861)</td>\n<td width=\"318\">$1026 to $4035 (Lower Middle Income)\n\n$4036 to $12475 (Upper Middle Income)</td>\n</tr>\n<tr>\n<td width=\"198\">Higher Income Economy</td>\n<td width=\"318\">$ 12476 and above</td>\n</tr>\n</tbody>\n</table>\n<p style=\"text-align: justify;\">According to World Bank metrics, a country with less than $1045 is considered as low-income economy whereas one with a PCI of $12736 or higher is considered as a higher income economy. Higher income means higher standard of living. India is at the bottom of the lower middle-income economies and has to achieve higher economic growth, structural changes including industrialisation to raise per capita income near to the $12736 mark in the long run. This is what the country has to achieve through the transition.</p>\n\n<ol style=\"text-align: justify;\" start=\"2\">\n \t<li><strong> Industrial sector expansion</strong></li>\n</ol>\n<p style=\"text-align: justify;\">There are several factors that drives the economy to prosperity. Per capita income is just a monitored goal. How it can be raised is through achieving more productivity and employment generation in the sectors that can create big changes is decisive element for the country’s transition. Here comes the role of industrial sector. The industrial sector is known for generating huge employment with minimum skill addition. Similarly, no other sector has higher level of tradability as the industrial sector (means a country can earn big income through exports). Graduating to an expanded services sector without undergoing industrialisation will be self-defeating and unsuitable to a big economy like India. Depending on services sector for exports will not reward as other countries like to protect their services sector from the inflow of India’s skilled persons. If India can increase the contribution of the industrial sector in GDP from the present 30 per cent to say 40-45%, it implies that sizable income and employment are created in the sector.</p>\n\n<ol style=\"text-align: justify;\" start=\"3\">\n \t<li><strong> Skilling the people when demography favours.</strong></li>\n</ol>\n<p style=\"text-align: justify;\">India has the largest number of young people in the world besides having largest workforce age group population. This situation is expected to remain till 2045. Now, youth means higher ability to produce, consume and thus stimulate overall economic activities. As in the case of an individual, better things happen for an economy when it is young.</p>\n\n<ol style=\"text-align: justify;\" start=\"4\">\n \t<li><strong> Infrastructure generation.</strong></li>\n</ol>\n<p style=\"text-align: justify;\">Infrastructure is the platform for fueling growth. The government has launched several programmes to build quality infrastructure to assist economic transformation. In the industrial sector, there is the industrial corridor project; in transportation – there is the NHDP, PMGSY, Bhartamala, Sagarmala etc. Similarly, digital infrastructure is undergoing a qualitative improvement along with the education sector.</p>\n\n<ol style=\"text-align: justify;\" start=\"5\">\n \t<li><strong> Building invention and Innovation.</strong></li>\n</ol>\n<p style=\"text-align: justify;\">Development is dynamic and present day developing economies can’t achieve development with the strategy of the past. Fourth industrialisation, robotics, artificial intelligence etc., proved that industrialisation is not labour oriented. Here, Countries like China with the aid of superior technology with its sizable labour force can produce and supply goods to the entire world. Competing in the new age industrial sector need good technological adaptation and a progressive national invention and educational systems.</p>\n\n<ol style=\"text-align: justify;\" start=\"6\">\n \t<li><strong> Easing of Doing Business.</strong></li>\n</ol>\n<p style=\"text-align: justify;\">India’s business environment is historically suffocated by excess regulations and slow bureaucratic functions that are unsuitable for enterprise development.. But in recent years, institutional reforms are taking place and development blocking regulations are in the process of elimination.</p>\n<p style=\"text-align: justify;\">Development has become a major theme of the government and every issue related with economic prosperity are sophisticatedly addressed. Improvements in all the above field is slowly yielding results. Despite the adverse global slowdown and anti-globalisation headwinds, India continues to be the fastest growing large economy.</p>",
        "curriculum": false,
        "reviews": [],
        "instructors": [{
            "id": "22",
            "name": "tojo",
            "avatar": "https://www.mywebsite.com/lms/wp-content/uploads/2017/11/favicon.png",
            "sub": "",
            "average_rating": 0,
            "student_count": 0,
            "course_count": "0",
            "bio": false
        }],
        "purchase_link": false
    },
    "headers": [],
    "status": 200
}]
[{
“数据”:{
“课程”:{
“id”:2864,
“名称”:“2.了解印度的经济转型”,
“创建日期”:1506154480,
“状态”:“发布”,
“价格”:假,
“价格”:“免费”,
“学生总数”:0,
“席位”:“,
“开始日期”:false,
“平均_评级”:0,
“评级计数”:0,
“特色图片”:https://www.mywebsite.com/lms/wp-content/themes/wplms/assets/images/avatar.jpg",
“类别”:[],
“讲师”:{
“id”:“22”,
“名称”:“aami”,
“阿凡达”:https://www.mywebsite.com/lms/wp-content/uploads/2017/11/favicon.png",
“sub”:”
},
“菜单顺序”:0
},
“说明”:“

印度正在经历经济、社会和技术转型。在塑造国家未来以及决定人民福利方面,也许没有任何其他阶段会像现在这样至关重要。经济转型是这些全面变革的重要组成部分。伴随着工业部门的快速增长r扩展、增加人员技能、创建高质量的基础设施等将推动这一增长阶段。

\n

为了了解目前的发展阶段有多重要,我们必须采用历史和比较研究。以下因素有助于我们了解印度目前的发展阶段。

\n\n\t
  • 作为中等收入经济体实现更高的增长率。
  • \n\n

    印度目前是中低收入经济体,必须成为高收入经济体,并经历至少三十年的快速增长阶段。

    \n

    关于印度经济的最重要的叙述是,在购买力平价GDP方面,它是世界上第三大的国家。但是,考虑一个国家的发展的一个优越的方法是考虑人均收入。关于国家经济地位的广泛使用的排名是世界银行的人均GDP(不变美元)。2016年的数据显示,印度人均收入为1861美元,而中国为6994美元。

    \n

    表:按世界银行分类的国家

    \n\n\n\n类别\n截至2015年的PCI(以美元为单位)\n\n\n低收入经济体\n 1025美元或以下\n\n\n中等收入经济体\n\n(印度-1861美元)\n 1026美元至4035美元(中下层收入)\n\n 4036美元至12475美元(中上层收入)\n\n\n高收入经济体\n$12476及以上\n\n\n\n

    根据世界银行的指标,收入低于1045美元的国家被视为低收入经济体,而PCI为12736美元或更高的国家被视为高收入经济体。高收入意味着更高的生活水平。印度位于中低收入经济体的底部,必须实现更高的经济增长包括工业化在内的一系列措施,从长远来看,将人均收入提高到12736美元附近。这是该国必须通过转型实现的目标。

    \n\n\t
  • 工业部门扩张
  • \n\n

    推动经济繁荣的因素有很多。人均收入只是一个受监控的目标。如何提高人均收入,是通过在能够带来巨大变化的部门实现更高的生产率和创造更多就业机会,这是国家转型的决定性因素。工业部门的作用来了。工业部门ector以在最低技能增加的情况下创造大量就业而闻名。同样,没有任何其他部门的可贸易性比工业部门更高(意味着一个国家可以通过出口赚取高额收入)。在不经历工业化的情况下,毕业于扩大的服务业将是自相矛盾的,不适合像印度这样的大经济体。由于其他国家希望保护其服务业不受印度技术人才流入的影响,依赖服务业的出口将得不到回报。如果印度能够增加工业部门在GDP中所占比例从目前的30%提高到40-45%,这意味着该部门创造了可观的收入和就业机会。

    \n\n\t
  • 在人口结构有利的情况下为人们提供技能。
  • \n\n

    印度除了拥有最大的劳动力年龄组人口外,还拥有世界上最多的年轻人。这种情况预计将持续到2045年。现在,年轻意味着更高的生产、消费能力,从而刺激整体经济活动。就个人而言,一个经济体在年轻时会发生更好的事情

    \n\n\t
  • 基础结构生成。
  • \n\n

    基础设施是推动增长的平台。政府启动了多项计划,建设优质基础设施,以协助经济转型。在工业部门,有工业走廊项目;在交通运输领域,有NHDP、PMGSY、Bhartmala、Sagarmala等。同样,数字基础设施也在发展与教育部门一起进行质量改进。

    \n\n\t
  • 建立发明和创新。
  • \n\n

    发展是动态的,当今的发展中经济体无法用过去的战略实现发展。第四次工业化、机器人技术、人工智能等证明了工业

    const regex = /(<([^>]+)>)/ig;
    const result = data.description.replace(regex, '');